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

Re: determine sequence name for a serial

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
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:13:47
Message-ID: 20041028051347.GA10946@dcc.uchile.cl (view raw or flat)
Thread:
Lists: pgsql-general
On Wed, Oct 27, 2004 at 09:33:21PM -0700, Robby Russell wrote:

> So, it was a nice attempt, but I am back to the need to of determining
> the sequence name using a schema and a table.

The schema of a table is stored in pg_class.relnamespace, which is an
Oid of the pg_namespace catalog.  With that and your previous query you
should be set.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La felicidad no es maƱana. La felicidad es ahora"


In response to

pgsql-general by date

Next:From: Jonathan DaughertyDate: 2004-10-28 05:14:06
Subject: Re: determine sequence name for a serial
Previous:From: Tom LaneDate: 2004-10-28 05:01:20
Subject: Re: compatibilityissues from 7.1 to 7.4

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