Thus during the recent switch to asyncpg (commit 18ef939a04f) broke compatibility
with sqlite3 before v3.35.
The resulting exception was:
sqlite3.OperationalError: near "RETURNING": syntax error
Simply removing the RETURNING (id) suffix of the query fixes the issues for such an older
versions of sqlite3.
Please note, that the latest stable release of Debian (Bullseye) ships an older version of sqlite3.
The same goes for the latest LTS release of Ubuntu.
Only the latest short-term supported release of Ubuntu (Impish Indri) contains a newer version
(supporting RETURNING).
The language feature
RETURNING
was added to sqlite3 in release v3.35. See https://www.sqlite.org/draft/lang_returning.htmlThus during the recent switch to
asyncpg
(commit 18ef939a04f) broke compatibility with sqlite3 before v3.35. The resulting exception was:Simply removing the
RETURNING (id)
suffix of the query fixes the issues for such an older versions of sqlite3. Please note, that the latest stable release of Debian (Bullseye) ships an older version of sqlite3. The same goes for the latest LTS release of Ubuntu. Only the latest short-term supported release of Ubuntu (Impish Indri
) contains a newer version (supportingRETURNING
).