Re: Dynamic pgplsql triggers

From: "Worky Workerson" <worky(dot)workerson(at)gmail(dot)com>
To: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Dynamic pgplsql triggers
Date: 2006-08-01 14:06:02
Message-ID: ce4072df0608010706k2988a4d0r3e1ce56b8c1651dd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karl O. Pinc 2006-08-01 14:51:34 Where did the compat-postgresql-libs rpm get to?
Previous Message Worky Workerson 2006-08-01 14:02:07 Re: Dynamic pgplsql triggers