Re: re-novice coming back to pgsql: porting an SQLite update statement to postgres

Dominique Devienne <ddevienne@gmail.com>

From: Dominique Devienne <ddevienne@gmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Vincent Veyron <vv.lists@wanadoo.fr>, Dan Kortschak <dan+pgsql@kortschak.io>, pgsql-general@postgresql.org
Date: 2024-07-23T21:52:47Z
Lists: pgsql-general
On Tue, Jul 23, 2024 at 10:35 PM Adrian Klaver
<adrian.klaver@aklaver.com> wrote:
> Just know that SQLite does not enforce types [...]

That's true, and applies to the OP's schema.

But for the record, SQLite *can* enforce types these days,
on an opt-in basis, with [STRICT tables][1].
Albeit with a limited type-system. --DD

PS: and could be done manually even before, with CHECK
(typeof(col)='blob') for example.

[1]: https://www.sqlite.org/stricttables.html