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

get id of insert in plpgsql function

From: "A B" <gentosaker(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: get id of insert in plpgsql function
Date: 2008-05-22 07:56:49
Message-ID: dbbf25900805220056n7826a97ek576095a3e9372b99@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
If I have a table mytable (id serial, y integer)  and wish to insert a
row into the table in a plpgsql function, how can I catch the id
(serial number) of the last inserted row?

Responses

pgsql-novice by date

Next:From: A. KretschmerDate: 2008-05-22 08:03:57
Subject: Re: get id of insert in plpgsql function
Previous:From: G. J. WalshDate: 2008-05-21 22:39:17
Subject: recreating tables from global files

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