Re: Dynamic pgplsql triggers - Mailing list pgsql-general

From Worky Workerson
Subject Re: Dynamic pgplsql triggers
Date
Msg-id ce4072df0608010706k2988a4d0r3e1ce56b8c1651dd@mail.gmail.com
Whole thread Raw
In response to Re: Dynamic pgplsql triggers  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-general
> I don't think it's possible.  however, what is possible and achieves
> roughly the same affect is to query the system catalogs  (or
> information schema) and via dynamic sql cut trigger
> funtions/procedures by looping the results of your query.  non-dynamic
> sql will usually be a bit faster than dynamic as a bonus, the only
> downsie is you are creating a lot of functions, albeit in easy to
> manage fashion.  If you are really clever, you can put your trigger
> functions in a special schema for organizational purposes.

Thanks for that hint.  I've been thinking about that ... I do similar
things to create all and trigger the partitions.  And, since I have a
regular naming for the partitions, I don't have to go to the catalogs.
 It seems a little excessive to have to create a different function
for each of the triggers, however, when each one is basically the
same.

pgsql-general by date:

Previous
From: "Worky Workerson"
Date:
Subject: Re: Dynamic pgplsql triggers
Next
From: "Karl O. Pinc"
Date:
Subject: Where did the compat-postgresql-libs rpm get to?