Re: Sequences and inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Richardson <brichardson(at)lineone(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Sequences and inheritance
Date: 2001-07-31 14:53:28
Message-ID: 10757.996591208@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruce Richardson <brichardson(at)lineone(dot)net> writes:
> If I have a set of tables and I set their primary keys all to the same
> sequence, as in
> ...
> Would this guarantee that each value of ID in any row of any of the
> tables would be unique amongst all of them?

As long as the sequence doesn't wrap around, yes.

IIRC, you can set up a sequence to error out rather than wrap when
it hits the max...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message wsheldah 2001-07-31 15:00:23 Re: ODBC read/write permission in MS Access
Previous Message Joel Burton 2001-07-31 14:43:43 Re: ODBC read/write permission in MS Access