INSERT Return Value?

From: Greg Lindstrom <greg(dot)lindstrom(at)novasyshealth(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: INSERT Return Value?
Date: 2006-12-11 20:46:08
Message-ID: 457DC390.5020101@novasyshealth.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello-

I am running Postgres 8.08 on a Linux system. When I insert data into a
table I generate and store a value in the table via a trigger that fires
after the insert. Is there a way to retrieve the value that I generate
with the trigger? In this case, I am generating a broker number and
would like to get it back. One method would be to grab the sequence
number of the record and then make another query, but I feel there is a
more elegant way to get the field.

Thanks for your help,
--greg

--
Greg Lindstrom 501 975.4859 (office)
Programmer 501 219-4455 (fax)
NovaSys Health greg(dot)lindstrom(at)novasyshealth(dot)com
Little Rock, Arkansas

"We are the music makers, and we are the dreamers of dreams." W.W.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bram Kuijper 2006-12-11 22:48:09 do not obtain all columns from DBD::Pg
Previous Message Philippe Salama 2006-12-11 17:24:36 Re: delete cascade question