| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> | 
|---|---|
| To: | Tarlika Elisabeth Schmitz <postgresql3(at)numerixtechnology(dot)de> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: trigger - dynamic WHERE clause | 
| Date: | 2011-05-22 18:39:01 | 
| Message-ID: | BANLkTi=duDhBAkHNXH4=zH0MQgvcTnN4iA@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Hello
2011/5/22 Tarlika Elisabeth Schmitz <postgresql3(at)numerixtechnology(dot)de>:
> EXECUTE 'SELECT 1 FROM ' || TG_TABLE_NAME || ' WHERE ' || whereclause
> || ' FOR UPDATE;';
>
> I am generating the whereclause dynamically as the number of columns
> queried varies.
>
> Am I right in assuming that I cannot use EXECUTE ... USING in this
> scenario?
>
why not? You can use it - just USING has a fixed numbers of
parameters, so you should to use a arrays.
Regards
Pavel Stehule
> --
>
> Best Regards,
> Tarlika Elisabeth Schmitz
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | jun yang | 2011-05-23 00:33:03 | Re: how to start a procedure after postgresql started. | 
| Previous Message | John R Pierce | 2011-05-22 18:13:58 | Re: Unable to Install - "unable to write inside TEMP environment variable path" |