On 7/13/22 07:58, André Hänsel wrote:
Jeremy Smith wrote:
CREATE TABLE t ( id serial PRIMARY KEY, name text NOT NULL UNIQUE, address text NOT NULL );
This will yield “8”, showing that new sequence numbers have been generated for each attempt.
If running out of id's is a concern use bigserial instead of serial as it uses bigint:
bigint -9223372036854775808 to +9223372036854775807 vs integer for serial: integer -2147483648 to +2147483647 -- Adrian Klaver adrian.klaver@xxxxxxxxxxx