Re: Triggers and Multiple Schemas. - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Triggers and Multiple Schemas.
Date
Msg-id 20060308204146.GA56709@winnie.fuhr.org
Whole thread Raw
In response to Triggers and Multiple Schemas.  ("Paul Newman" <paul.newman@tripoint.co.uk>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Triggers and Multiple Schemas.
Next
From: Louis Gonzales
Date:
Subject: Re: Triggers and Multiple Schemas.