Lists: | pgsql-sql |
---|
From: | jferry(at)iexposure(dot)com |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | START for SERIAL type? |
Date: | 2001-05-28 00:10:05 |
Message-ID: | 3B11975D.2BBC3350@iexposure.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
When you create a SEQUENCE, you are allowed to specify a START. Is
there a way to specify a START if you use a serial type in a CREATE
TABLE statement?
I'm envisioning something like:
CREATE TABLE foo ( foo_id serial ( 101 ) );
From: | Vivek Khera <khera(at)kcilink(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: START for SERIAL type? |
Date: | 2001-05-29 19:47:11 |
Message-ID: | x7ae3wj5ts.fsf@onceler.kciLink.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
>>>>> "j" == jferry <jferry(at)iexposure(dot)com> writes:
j> When you create a SEQUENCE, you are allowed to specify a START. Is
j> there a way to specify a START if you use a serial type in a CREATE
j> TABLE statement?
No. You do it after you create the table. The SERIAL type creates a
sequence, so just use the sequence command setval() to set the
starting value for the named sequence.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera(at)kciLink(dot)com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
From: | "Frank Contrepois" <sokak(at)tin(dot)it> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: START for SERIAL type? |
Date: | 2001-05-30 21:23:20 |
Message-ID: | 9f3oh0$1p8b$2@news.tht.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
read the doc section datatype!!!
serial just create a sequence on a standard way, if you dont like it you'll
have to create your sequence.
bye
--
--
"L'idea di base estremamente semplice..."
opyright Frank "Pazzooo" Contrepois (schiavista francese del '900)