Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group