Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 82168475F09 for ; Wed, 28 Aug 2002 11:09:47 -0400 (EDT) Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id 4DC37475E97 for ; Wed, 28 Aug 2002 11:09:46 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g7SF9gS17089; Wed, 28 Aug 2002 11:09:42 -0400 (EDT) From: Bruce Momjian Message-Id: <200208281509.g7SF9gS17089@candle.pha.pa.us> Subject: Re: SERIAL parameters In-Reply-To: <64261.10.33.12.1.1030507385.squirrel@www.engg.upd.edu.ph> To: Arnold Putong Date: Wed, 28 Aug 2002 11:09:42 -0400 (EDT) Cc: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/393 X-Sequence-Number: 9239 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@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073