Re: Question regardding info available in customer C trigger function - Mailing list pgsql-docs

From Tom Lane
Subject Re: Question regardding info available in customer C trigger function
Date
Msg-id 5695.988230461@sss.pgh.pa.us
Whole thread Raw
In response to Question regardding info available in customer C trigger function  ("Curtis H. Wilbar Jr." <curtis@hawkmountain.net>)
List pgsql-docs
"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

pgsql-docs by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: Translation
Next
From: Mark Butler
Date:
Subject: Re: Are there unsigned int types in the manual