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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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