Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

Next:From: Michael FuhrDate: 2004-10-28 05:33:30
Subject: Re: determine sequence name for a serial
Previous:From: Jonathan DaughertyDate: 2004-10-28 05:14:06
Subject: Re: determine sequence name for a serial

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group