On Tue, Mar 07, 2006 at 06:34:33AM -0000, Paul Newman wrote: > However at the moment we are placing the trigger functions within each > schema along with trigger itself. The reason is that we don't know of a > function or a variable that says "Give me the schema of the trigger that > is calling this function". PL/pgSQL triggers receive the table's oid in TG_RELID. You could query pg_class and join to pg_namespace to get the table's schema name. Is that what you're looking for? -- Michael Fuhr