From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Arnold Putong <arnold(at)engg(dot)upd(dot)edu(dot)ph> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: SERIAL parameters |
Date: | 2002-08-28 15:09:42 |
Message-ID: | 200208281509.g7SF9gS17089@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
You can create the sequence manually and define that a the default for
the column. I suppose we could pass the create sequence params through
SERIAL but there doesn't seem like there is much demand for it.
---------------------------------------------------------------------------
Arnold Putong wrote:
> Would it be possible to have parameters in the SERIAL datatype?
>
> CREATE TABLE x { ID SERIAL(100, 10) }
>
> means ID starts at 100 and will be incremented by 10. And it would be
> nice to have
>
> CREATE TABLE x { ID SERIAL(0,0) }
>
> mean that ID will be issued random non-repeating values (period=2^bitwidth
> of type). This is most likely useful in replication/merging data.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Vivek Khera | 2002-08-28 15:28:21 | Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1? |
Previous Message | Stephan Szabo | 2002-08-28 15:04:35 | Re: Problems with version 7.1, could they be fixed in 7.2? |