From: | "Michael Black" <mblack55(at)earthlink(dot)net> |
---|---|
To: | pgsql-questions(at)postgresql(dot)org |
Subject: | Before and After Triggers? |
Date: | 2000-04-02 02:12:33 |
Message-ID: | l0yF4.13512$9m6.534094@newsread1.prod.itd.earthlink.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Will PostgreSQL handle both a Before and an After
trigger on a single table?
Here is the deal...
I have several primary tables that use a serial datatype
for the primary key of the table. This key will need to
be returned to the calling program for display showing
that the record/row has actually been inserted into the
database table. However, prior to inserting this
record/row I need to populate a timestamp and userid.
I guess what I could do is have the program get the userid
and the timestamp prior to insertaion and pass then with
the rest of the data. Then perform a select for the userid
and timestamp used in the insert to get the recid, or primary
key, for display.
Any thoughts on how I can return the record id fron the trigger?
Michael Black
From | Date | Subject | |
---|---|---|---|
Next Message | Victor Manuel Jaquez Leal | 2000-04-02 17:44:49 | Re: Apache::Session in PostgreSQL |
Previous Message | Nilesh A. Phadke | 2000-04-01 20:49:09 | Embedded SQL -- ecpg |