Connecting Tech Pros Worldwide Forums | Help | Site Map

Triggers in PostgreSQL

Newbie
 
Join Date: Feb 2009
Posts: 2
#1: Feb 3 '09
I have read few topics on Triggers..

I was just wondering if it is possible to have a parameter to a function from the external environment..

I mean...
I am into PHP and PostgreSQL and we want to integrate logs in our system, to keep track of the operations for each and every user. So, is it possible to acquire the user's id and use it in a function???

Moderator
 
Join Date: Dec 2006
Location: Europe
Posts: 292
#2: Feb 3 '09

re: Triggers in PostgreSQL


You can define function arguments while creating trigger (no while creating function). You can use arguments value via TG_ARG[] table.
For more see here http://www.postgresql.org/docs/8.1/i...l-trigger.html
Reply