From: Alvaro Herrera <alvherre@commandprompt.com>
To: Uwe Maiwald <u.maiwald@kiss-net.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: get sequence name from table name
Date: Fri, 4 Dec 2009 16:24:34 -0300
Message-ID: <20091204192434.GF4705@alvh.no-ip.org> (raw)
In-Reply-To: <4B193E8E.6010603@kiss-net.de>
References: <4B193E8E.6010603@kiss-net.de>
Uwe Maiwald wrote:
> how to get the name of the sequence that is responsible for setting
> the autoincrement value of a tables primary key column?
You can use the pg_get_serial_sequence() function. You need the name of
the column in addition to the table name though.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: alvherre@commandprompt.com, u.maiwald@kiss-net.de
Subject: Re: get sequence name from table name
In-Reply-To: <20091204192434.GF4705@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox