Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour - Mailing list pgsql-general

From Pavel Stehule
Subject Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour
Date
Msg-id 162867791001150054j78edcefnd4906849b30c4f57@mail.gmail.com
Whole thread Raw
In response to Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour  (Vincenzo Romano <vincenzo.romano@notorand.it>)
Responses Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
2010/1/15 Vincenzo Romano <vincenzo.romano@notorand.it>:
> 2010/1/15 Pavel Stehule <pavel.stehule@gmail.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.

this is bad. Placeholders are used only when are explicit - tj they
are in string constant. Content of variables are protected.

Pavel

>
> --
> Vincenzo Romano
> NotOrAnd Information Technologies
> cel. +39 339 8083886  | gtalk. vincenzo.romano@notorand.it
> fix. +39 0823 454163  | skype. notorand.it
> fax. +39 02 700506964 | msn.   notorand.it
> NON QVIETIS MARIBVS NAVTA PERITVS
>

pgsql-general by date:

Previous
From: Vincenzo Romano
Date:
Subject: Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour
Next
From: Pavel Stehule
Date:
Subject: Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour