On 4/4/19 11:27 AM, Rich Shepard wrote:
On Thu, 4 Apr 2019, Adrian Klaver wrote:
See:
https://www.postgresql.org/docs/11/sql-createsequence.html
Thanks, Adrian.
My web searches did not find this URL, only results on how to set up
automatic serial id generation.
Well serial is basically a macro for:
https://www.postgresql.org/docs/11/datatype-numeric.html#DATATYPE-SERIAL
"CREATE SEQUENCE tablename_colname_seq;
CREATE TABLE tablename (
colname integer NOT NULL DEFAULT nextval('tablename_colname_seq')
);
ALTER SEQUENCE tablename_colname_seq OWNED BY tablename.colname;
"
Regards,
Rich
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx