Re: Trigger Function question - Mailing list pgsql-general

From Christophe Pettus
Subject Re: Trigger Function question
Date
Msg-id DF18ED9A-83D1-4CE8-888F-2BF3393CD9A3@thebuild.com
Whole thread Raw
In response to Trigger Function question  (DAVID ROTH <adaptron@comcast.net>)
Responses Re: Trigger Function question  (DAVID ROTH <adaptron@comcast.net>)
List pgsql-general

> On Jul 10, 2023, at 11:20, DAVID ROTH <adaptron@comcast.net> wrote:
>
> In a trigger function, is there a way to get a list of all of the columns in the triggering table?

You can get the table that the trigger fired on with TG_TABLE_SCHEMA and TG_TABLE_NAME, and then query the system
catalogsto get a list of columns. 

But can you tell us a bit more about your use-case?  You may be able to write the trigger in such a way that it doesn't
needto change behavior based on the columns. 


pgsql-general by date:

Previous
From: DAVID ROTH
Date:
Subject: Trigger Function question
Next
From: DAVID ROTH
Date:
Subject: Re: Trigger Function question