Re: [SQL] Default sequence values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Seth Banks" <seth(at)subimage(dot)com>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Default sequence values
Date: 2000-02-27 07:48:20
Message-ID: 20756.951637700@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Seth Banks" <seth(at)subimage(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2000-02-27 15:18:39 Re: [SQL] INSERT w/o variable names for a SERIAL type?
Previous Message Seth Banks 2000-02-27 07:45:36 Default sequence values