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