Re: Triggers and Multiple Schemas.

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Paul Newman <paul(dot)newman(at)tripoint(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Triggers and Multiple Schemas.
Date: 2006-03-08 20:41:46
Message-ID: 20060308204146.GA56709@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Louis Gonzales 2006-03-08 20:42:57 Re: Triggers and Multiple Schemas.
Previous Message Scott Marlowe 2006-03-08 20:34:18 Re: Triggers and Multiple Schemas.