Re: [SQL] Default sequence values - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] Default sequence values
Date
Msg-id 20756.951637700@sss.pgh.pa.us
Whole thread Raw
In response to Default sequence values  ("Seth Banks" <seth@subimage.com>)
List pgsql-sql
"Seth Banks" <seth@subimage.com> writes:
>   company_id     int4 PRIMARY KEY DEFAULT nextval(company_id_seq),

Try
 company_id     int4 PRIMARY KEY DEFAULT nextval('company_id_seq'),

Actually, this would work just as well:
 company_id     SERIAL,

and it'd even make the sequence object for you.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Seth Banks"
Date:
Subject: Default sequence values
Next
From: Peter Eisentraut
Date:
Subject: Re: [SQL] INSERT w/o variable names for a SERIAL type?