deduce sequence name from table and column

From: Louis-David Mitterrand <vindex(at)apartia(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: deduce sequence name from table and column
Date: 2005-12-20 15:04:53
Message-ID: 20051220150453.GA26818@apartia.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Is there a way (from DBI) to deduce a sequence name from the table and
column it is attached to?

For instance:

Column | Type | Modifiers
-------------+---------+--------------------------------------------------------------------------
id_fonction | integer | not null default nextval(('"fonction_id_fonction_seq"'::text)::regclass)

I'd like to be able to programmatically find "fonction_id_fonction_seq"
so that I can then call nextval() on it.

Thanks,

--
Only half the people in the world are above average intelligence.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arnulf Christl 2005-12-20 15:17:21 Re: [Mapbender-users] Re: [Freegis-list] Re: [GENERAL]
Previous Message Henrique Engelmann 2005-12-20 13:42:51 Could not read - Permission denied