Re: returning the primary key value

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Jason Tesser <JTesser(at)nbbc(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: returning the primary key value
Date: 2005-09-22 03:28:27
Message-ID: 20050922032827.GA90411@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 21, 2005 at 02:22:22PM -0500, Jason Tesser wrote:
> I have a stored proc in which I want to retur the primary key of
> an insert statement that the stored proc just ran. How can I do
> that?

If the primary key is a SERIAL column then see "How do I get the
value of a SERIAL insert?" in the FAQ:

http://www.postgresql.org/docs/faqs.FAQ.html#4.11.2

--
Michael Fuhr

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guido Neitzer 2005-09-22 05:40:40 Re: JDBC error w/ WebObjects
Previous Message Josh Berkus 2005-09-22 02:21:30 Re: YAPC::Israel looking for Perl/Database speakers