Re: Question regardding info available in customer C trigger function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Curtis H(dot) Wilbar Jr(dot)" <curtis(at)hawkmountain(dot)net>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Question regardding info available in customer C trigger function
Date: 2001-04-25 20:27:41
Message-ID: 5695.988230461@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

"Curtis H. Wilbar Jr." <curtis(at)hawkmountain(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Mark Butler 2001-04-25 22:52:42 Re: Are there unsigned int types in the manual
Previous Message Vince Vielhaber 2001-04-25 19:53:58 Re: Translation