Re: "ownership" of sequences, pseudo random unique id

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "ownership" of sequences, pseudo random unique id
Date: 2009-08-21 13:56:52
Message-ID: 2964.1250863012@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> I was mainly concerned about assigning ownership of a sequence to a
> column that is not an int.

I think you can get away with that. It's already the case within the
standard usage that the owning column could be either int or bigint.

FWIW, I agree with the idea of adding a default expression so that it
behaves even more like a regular serial column.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2009-08-21 14:16:20 Re: join from array or cursor
Previous Message Tom Lane 2009-08-21 13:44:58 Re: "Number of columns exceed limit" on a hierarchy of views