more-than-one-SERIAL column per table

From: will trillich <will(at)serensoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: more-than-one-SERIAL column per table
Date: 2001-05-09 17:57:54
Message-ID: 20010509125754.D19662@serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, May 06, 2001 at 02:59:31AM +0200, Morten Primdahl wrote:
> > \d tbl_c_id_seq
> >
> > if it is not there, you can create it yourself
>
> Thanks, the sequence was not there. Just puzzled me that
> when creating tbl_c, I get:
>
> test=# CREATE TABLE tbl_c
> (id SERIAL PRIMARY KEY,
> data VARCHAR(50),
> a SERIAL CONSTRAINT a_ref REFERENCES tbl_a(id),
> b SERIAL CONSTRAINT b_ref REFERENCES tbl_b(id)
> );

is there any paradigm wherein TWO serial values for one table
might possible be useful? (since serial is really "int default
nextval('sequence_seq')" how can the second serial be anything
but redundant?)

--
don't visit this page. it's bad for you. take my expert word for it.
http://www.salon.com/people/col/pagl/2001/03/21/spring/index1.html

will(at)serensoft(dot)com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-05-09 18:02:21 Re: 'current' timestamp bug
Previous Message Tony Grant 2001-05-09 17:35:02 Moving to 7.1.1