From: Tom Lane <tgl@sss.pgh.pa.us>
To: Curtis H. Wilbar Jr. <curtis@hawkmountain.net>
Cc: pgsql-docs@postgresql.org
Subject: Re: Question regardding info available in customer C trigger function
Date: Wed, 25 Apr 2001 16:27:41 -0400
Message-ID: <5695.988230461@sss.pgh.pa.us> (raw)
In-Reply-To: <200104250105.VAA03355@fury.cw.ici.net>
References: <200104250105.VAA03355@fury.cw.ici.net>
"Curtis H. Wilbar Jr." <curtis@hawkmountain.net> writes:
> However, is there a way in my C function to determine the name of the
> table and of the database that caused the trigger.
The current database name is not passed around as a parameter, but you
can get it from the global variable DatabaseName. As for the table
name, try RelationGetRelationName(triggerdata->tg_relation).
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, curtis@hawkmountain.net
Subject: Re: Question regardding info available in customer C trigger function
In-Reply-To: <5695.988230461@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox