pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Arnold Putong <arnold@engg.upd.edu.ph>
Cc: pgsql-sql@postgresql.org
Subject: Re: SERIAL parameters
Date: Wed, 28 Aug 2002 11:09:42 -0400 (EDT)
Message-ID: <200208281509.g7SF9gS17089@candle.pha.pa.us> (raw)
In-Reply-To: <64261.10.33.12.1.1030507385.squirrel@www.engg.upd.edu.ph>


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



view thread (2+ messages)

Message-ID: <200208281509.g7SF9gS17089@candle.pha.pa.us>
Permalink:  ../200208281509.g7SF9gS17089@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200208281509.g7SF9gS17089@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgman@candle.pha.pa.us, arnold@engg.upd.edu.ph
  Subject: Re: SERIAL parameters
  In-Reply-To: <200208281509.g7SF9gS17089@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox