synapse icon indicating copy to clipboard operation
synapse copied to clipboard

Always use `RETURNING` once the minimum supported SQLite version is 3.35.0

Open AndrewFerr opened this issue 1 year ago • 0 comments

The minimum supported version of SQLite3 at the time of writing is 3.34 (since that's what's in Debian oldstable right now), which doesn't support the RETURNING clause in INSERT/UPDATE/DELETE queries. That means every such usage of RETURNING must be gated by a check to BaseDatabaseEngine.supports_returning or when it's known that a Postgres database is in use.

The earliest version of SQLite3 to support this usage of RETURNING is 3.35.0, so once the minimum supported version is that or newer, Synapse can assume RETURNING is always available.

AndrewFerr avatar Aug 15 '24 19:08 AndrewFerr