From: | Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | adrian(dot)klaver(at)gmail(dot)com, Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour |
Date: | 2010-01-15 08:42:00 |
Message-ID: | 3eff28921001150042x18587b0kb0a0d5e15ff2e0b0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2010/1/15 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>>
>> 3. Then I need to add the TABLE-level CHECK condition in order to
>> exploit the "constraint_exclusion = on":
>> execute $l2$
>> alter table $l2$||ct||$l2$
>> add check( $l0$||co||$l0$ )
>> $l2$ using $l0$||va||$l0$;
>>
>
> I am sorry, I am out. Your code isn't much readable:
>
> Minimally there isn't placeholder - some like $x
>
> It is game for the most cryptografic code :).
>
> You searching a functionality that isn't in pg now :(. Clause USING
> doesn't work like macros or templates in C++
>
> look on this page - maybe it could be useful for you
> http://wiki.postgresql.org/wiki/Sprintf
>
> Regards
> Pavel
>
Pavel,
It's worse than cryptographic if you skip the starting points. I do
admit it's far from plain PLPGSQL, though.
The "co" text variable contains the $x placeholders, the "va" text
variable contains the expressions to be used.
--
Vincenzo Romano
NotOrAnd Information Technologies
cel. +39 339 8083886 | gtalk. vincenzo(dot)romano(at)notorand(dot)it
fix. +39 0823 454163 | skype. notorand.it
fax. +39 02 700506964 | msn. notorand.it
NON QVIETIS MARIBVS NAVTA PERITVS
From | Date | Subject | |
---|---|---|---|
Next Message | Vincenzo Romano | 2010-01-15 08:44:57 | Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour |
Previous Message | Pavel Stehule | 2010-01-15 08:36:03 | Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour |