Hi Laurent.
As I understand where is no direct link between sequence and the table
column. You should see pg_attrdef table.
Query SELECT pg_get_expr(adbin,adrelid) FROM pg_attrdef; will return
you all default values of the columns. Among them you will find
nextval('your_sequence'::regclass).
Hope that helps...
Laurent ROCHE rašė:
> Hi,
>
> I have posted this on the pg main list ... and as I had no sensible
> answers, I am trying here.
> Also, it's likely someone knows the answer as you need to get this
> info to display it in pgAdmin !
>
> I would like to write a request where I would get the table name and
> column name of a sequence. I have been looking at the sytem table and
> could not link the sequence from pg_class to a table (and even less to
> a column).
>
> Any ideas ?
>
> Have fun,
> L@u
> The Computing Froggy
>
>
>
> ------------------------------------------------------------------------
> Envoyé avec Yahoo! Mail
>
<http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html>.
> Une boite mail plus intelligente.
--
Julius Tuskenis
Programavimo skyriaus vadovas
UAB nSoft
mob. +37068233050