Re: determine sequence name for a serial

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robby Russell <robby(at)planetargon(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: determine sequence name for a serial
Date: 2004-10-28 05:15:04
Message-ID: 28156.1098940504@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Robby Russell <robby(at)planetargon(dot)com> writes:
> Ok, so how would I go about getting the sequence name for a SERIAL
> field on any given schema.table?

8.0 will have a function pg_get_serial_sequence to do this for you.
If you can't wait, the secret is to look in pg_depend for the dependency
link from the serial sequence to its column.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2004-10-28 05:33:30 Re: determine sequence name for a serial
Previous Message Jonathan Daugherty 2004-10-28 05:14:06 Re: determine sequence name for a serial