Search Postgresql Archives

Re: Does trigger only accept functions?

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

 



On Tue, 11 Jun 2024 at 18:25, Ron Johnson <ronljohnsonjr@xxxxxxxxx> wrote:

Since all the functions are going to be similar, I'd write a shell script to generate all the triggers, one per relevant.  If you're going to record every field, then save effort, and don't bother enumerating them.  You'll need to dig into the PG catalog's guts to list columns in the correct order, but Google and Stack Exchange makes that easy enough.

I'd use a DO block and write a loop in PL/PGSQL. Then everything stays in Postgres and you have all the support of Postgres when writing your SQL-writing code (quote_ident, the reg* types, etc.).

[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