Search Postgresql Archives

Re: Trigger Function question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jul 10, 2023, at 11:20, DAVID ROTH <adaptron@xxxxxxxxxxx> 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 catalogs to 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 need to change behavior based on the columns.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux