Search Postgresql Archives

trigger on view returning created serial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have created a view and on this view a trigger, which is called on an insert command on the view.
Within the trigger I run an insert on a table and one of the table fields uses a serial sequence, that
creates values. If I run in the trigger after the insert a "return NEW", the field (id) which should
be set by the serial on the table is 0, so how can I get the new created serial on the insert command
within the trigger function?

Thanks

Phil
-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux