2010/1/15 Vincenzo Romano :
> 2010/1/15 Pavel Stehule :
>> look on this page - maybe it could be useful for you
>> http://wiki.postgresql.org/wiki/Sprintf
>
> This one could save my day!
> Thanks Pavel.
EXECUTE PRINTF( );
It's great.
It's working.
It's a must-have-as-builtin!
--
Vincenzo
2010/1/15 Pavel Stehule :
> 2010/1/15 Vincenzo Romano :
>> 2010/1/15 Pavel Stehule :
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$
2010/1/15 Vincenzo Romano :
> 2010/1/15 Pavel Stehule :
>>>
>>> 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$ )
>>>
2010/1/15 Pavel Stehule :
> look on this page - maybe it could be useful for you
> http://wiki.postgresql.org/wiki/Sprintf
This one could save my day!
Thanks Pavel.
--
Vincenzo Romano
NotOrAnd Information Technologies
NON QVIETIS MARIBVS NAVTA PERITVS
--
Sent via pgsql-general mailing list (pg
2010/1/15 Pavel Stehule :
>>
>> 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$;
>
> 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 co
2010/1/14 Pavel Stehule :
> 2010/1/14 Vincenzo Romano :
>> 2010/1/14 Pavel Stehule :
>>> 2010/1/14 Vincenzo Romano :
2010/1/14 Adrian Klaver :
> On Wednesday 13 January 2010 10:19:57 pm Vincenzo Romano wrote:
>> ...
CREATE OR REPLACE FUNCTION f()
RETURNS VOID
LANGUAGE plpgsq
2010/1/14 Vincenzo Romano :
> 2010/1/14 Pavel Stehule :
>> 2010/1/14 Vincenzo Romano :
>>> 2010/1/14 Adrian Klaver :
On Wednesday 13 January 2010 10:19:57 pm Vincenzo Romano wrote:
> ...
>>> CREATE OR REPLACE FUNCTION f()
>>> RETURNS VOID
>>> LANGUAGE plpgsql
>>> AS $function$
>>> DECLARE
>>>
2010/1/14 Vincenzo Romano :
> 2010/1/14 Pavel Stehule :
>> 2010/1/14 Vincenzo Romano :
>>> 2010/1/14 Adrian Klaver :
On Wednesday 13 January 2010 10:19:57 pm Vincenzo Romano wrote:
> ...
>>> CREATE OR REPLACE FUNCTION f()
>>> RETURNS VOID
>>> LANGUAGE plpgsql
>>> AS $function$
>>> DECLARE
>>>
2010/1/14 Pavel Stehule :
> 2010/1/14 Vincenzo Romano :
>> 2010/1/14 Adrian Klaver :
>>> On Wednesday 13 January 2010 10:19:57 pm Vincenzo Romano wrote:
...
>> CREATE OR REPLACE FUNCTION f()
>> RETURNS VOID
>> LANGUAGE plpgsql
>> AS $function$
>> DECLARE
>> cmd TEXT;
>> BEGIN
>> EXECUTE '
>> S
2010/1/14 Vincenzo Romano :
> 2010/1/14 Adrian Klaver :
>> On Wednesday 13 January 2010 10:19:57 pm Vincenzo Romano wrote:
>>
>>> >
>>> > Scott, thanks for that I must have read through that section several
>>> > times at least with out picking up on it.
>>> >
>>> > --
>>> > Adrian Klaver
>>> > adr
2010/1/14 Adrian Klaver :
> On Wednesday 13 January 2010 10:19:57 pm Vincenzo Romano wrote:
>
>> >
>> > Scott, thanks for that I must have read through that section several
>> > times at least with out picking up on it.
>> >
>> > --
>> > Adrian Klaver
>> > adrian.kla...@gmail.com
>>
>> Really?
>>
>
On Wednesday 13 January 2010 10:19:57 pm Vincenzo Romano wrote:
> >
> > Scott, thanks for that I must have read through that section several
> > times at least with out picking up on it.
> >
> > --
> > Adrian Klaver
> > adrian.kla...@gmail.com
>
> Really?
>
> That section is not in any page of the
2010/1/14 Vincenzo Romano :
> The documentation says (also in v8.5) "These symbols refer to values
> supplied in the USING clause".
> "values"and not "variable name or reference". This leads to the useful
> feature mentioned a line later in the same page.
> Once you have a value replaced you can av
The documentation says (also in v8.5) "These symbols refer to values
supplied in the USING clause".
"values"and not "variable name or reference". This leads to the useful
feature mentioned a line later in the same page.
Once you have a value replaced you can avoid the restrictions you now
mention o
Scott Mead writes:
>Well it is in 8.5 Devel, so it could have been added immediately after
> your thread started yesterday, I'm honestly not sure.
The particular paragraph mentioned was committed here
http://archives.postgresql.org/pgsql-committers/2009-11/msg00094.php
but as you note it was
On Thu, Jan 14, 2010 at 7:19 AM, Vincenzo Romano <
vincenzo.rom...@notorand.it> wrote:
> 2010/1/14 Adrian Klaver :
> > On Wednesday 13 January 2010 2:17:51 pm Scott Mead wrote:
> >> On Wed, Jan 13, 2010 at 11:00 PM, Vincenzo Romano <
> >>
> >> vincenzo.rom...@notorand.it> wrote:
> >> > It is not t
2010/1/14 Adrian Klaver :
> On Wednesday 13 January 2010 2:17:51 pm Scott Mead wrote:
>> On Wed, Jan 13, 2010 at 11:00 PM, Vincenzo Romano <
>>
>> vincenzo.rom...@notorand.it> wrote:
>> > It is not the check or the select.
>> > It is the way the substitution has been implemented. It looks like the
On Wednesday 13 January 2010 2:17:51 pm Scott Mead wrote:
> On Wed, Jan 13, 2010 at 11:00 PM, Vincenzo Romano <
>
> vincenzo.rom...@notorand.it> wrote:
> > It is not the check or the select.
> > It is the way the substitution has been implemented. It looks like the
> > code replaces the variable na
On Wed, Jan 13, 2010 at 11:00 PM, Vincenzo Romano <
vincenzo.rom...@notorand.it> wrote:
> It is not the check or the select.
> It is the way the substitution has been implemented. It looks like the code
> replaces the variable name and not the value.
> Which is different from what is written at pa
It is not the check or the select.
It is the way the substitution has been implemented. It looks like the code
replaces the variable name and not the value.
Which is different from what is written at page 800.
I only hope they won't change the manual to match the feature/bug (warning:
new joke)
Il
On 01/13/2010 01:39 PM, Vincenzo Romano wrote:
My issue involves the USING predicates, though.
WARNING:Old joke
Doctor: What is wrong?
Patient: My elbow hurts when I do this, what should I do?
Doctor: Quit doing that.
USING is not working the way you want, mainly for the reason you found,
t
My issue involves the USING predicates, though.
Il giorno 13 gen, 2010 10:26 p., "Adrian Klaver"
ha scritto:
On 01/13/2010 09:37 AM, Vincenzo Romano wrote: > > 2010/1/13 Vincenzo
Romano
On 01/13/2010 09:37 AM, Vincenzo Romano wrote:
2010/1/13 Vincenzo Romano:
2010/1/13 Vincenzo Romano:
2010/1/13 Adrian Klaver:
On Tuesday 12 January 2010 9:38:06 pm Vincenzo Romano wrote:
The static binding worked fine in the second EXECUTE USING statement but
not in the first one.
I still thi
2010/1/13 Vincenzo Romano :
> 2010/1/13 Vincenzo Romano :
>> 2010/1/13 Adrian Klaver :
>>> On Tuesday 12 January 2010 9:38:06 pm Vincenzo Romano wrote:
The static binding worked fine in the second EXECUTE USING statement but
not in the first one.
I still think that it's weird more th
2010/1/13 Vincenzo Romano :
> 2010/1/13 Adrian Klaver :
>> On Tuesday 12 January 2010 9:38:06 pm Vincenzo Romano wrote:
>>> The static binding worked fine in the second EXECUTE USING statement but
>>> not in the first one.
>>> I still think that it's weird more than wishful.
>>> I can work it aroun
2010/1/13 Adrian Klaver :
> On Tuesday 12 January 2010 9:38:06 pm Vincenzo Romano wrote:
>> The static binding worked fine in the second EXECUTE USING statement but
>> not in the first one.
>> I still think that it's weird more than wishful.
>> I can work it around, though.
>>
>> Il giorno 12 gen,
On Tuesday 12 January 2010 9:38:06 pm Vincenzo Romano wrote:
> The static binding worked fine in the second EXECUTE USING statement but
> not in the first one.
> I still think that it's weird more than wishful.
> I can work it around, though.
>
> Il giorno 12 gen, 2010 4:13 p., "Tom Lane" ha scrit
2010/1/13 Vincenzo Romano :
> The static binding worked fine in the second EXECUTE USING statement but not
> in the first one.
> I still think that it's weird more than wishful.
> I can work it around, though.
>
> Il giorno 12 gen, 2010 4:13 p., "Tom Lane" ha scritto:
>
> Vincenzo Romano writes:
The static binding worked fine in the second EXECUTE USING statement but not
in the first one.
I still think that it's weird more than wishful.
I can work it around, though.
Il giorno 12 gen, 2010 4:13 p., "Tom Lane" ha scritto:
Vincenzo Romano writes:
> I don't think so. Those variables shoul
Vincenzo Romano writes:
> I don't think so. Those variables should be evaluated with the USING
> *before* the actual execution.
> Thus my statements only contain columns and constants.
Unfortunately, that's just wishful thinking, not how EXECUTE USING
actually works.
rega
2010/1/12 Adrian Klaver :
> On Tuesday 12 January 2010 6:24:13 am Vincenzo Romano wrote:
>> 2010/1/12 Tom Lane :
>> > Vincenzo Romano writes:
>> >> In a PL/PgSQL function I have the following:
>> >>
>> >> execute $l2$
>> >> alter table $l2$||ct||$l2$ add check(
>> >>
On Tuesday 12 January 2010 6:24:13 am Vincenzo Romano wrote:
> 2010/1/12 Tom Lane :
> > Vincenzo Romano writes:
> >> In a PL/PgSQL function I have the following:
> >>
> >> execute $l2$
> >> alter table $l2$||ct||$l2$ add check(
> >> data>=$1::timestamp and data<$2::t
2010/1/12 Tom Lane :
> Vincenzo Romano writes:
>> In a PL/PgSQL function I have the following:
>>
>> execute $l2$
>> alter table $l2$||ct||$l2$ add check(
>> data>=$1::timestamp and data<$2::timestamp and maga=$3 )
>> $l2$ using rec.d0,rec.d1,rec.maga;
>>
Vincenzo Romano writes:
> In a PL/PgSQL function I have the following:
>
> execute $l2$
> alter table $l2$||ct||$l2$ add check(
> data>=$1::timestamp and data<$2::timestamp and maga=$3 )
> $l2$ using rec.d0,rec.d1,rec.maga;
>
> which yields to this e
In a PL/PgSQL function I have the following:
execute $l2$
alter table $l2$||ct||$l2$ add check(
data>=$1::timestamp and data<$2::timestamp and maga=$3 )
$l2$ using rec.d0,rec.d1,rec.maga;
which yields to this error messsge:
ERROR: there is no p
36 matches
Mail list logo