2010/8/17 Tom Lane :
> =?ISO-8859-1?Q?C=E9dric_Villemain?=
> writes:
>> Here we are. A simple usecase.
>
> The reason you have an issue here is that the column is char(n) while
> the parameter is text. So the non-USING execute is equivalent to
>
> regression=# explain SELECT flag FROM foo where
=?ISO-8859-1?Q?C=E9dric_Villemain?= writes:
> Here we are. A simple usecase.
The reason you have an issue here is that the column is char(n) while
the parameter is text. So the non-USING execute is equivalent to
regression=# explain SELECT flag FROM foo where uid =
'cfcd208495d565ef66e7dff9f98
2010/8/17 Cédric Villemain :
> 2010/8/17 Tom Lane :
>> =?ISO-8859-1?Q?C=E9dric_Villemain?=
>> writes:
>>> 2010/8/16 Tom Lane :
=?ISO-8859-1?Q?C=E9dric_Villemain?=
writes:
> Unfortunely the current implementation of EXECUTE USING is not working
> this way.
Uh ... what
2010/8/17 Tom Lane :
> =?ISO-8859-1?Q?C=E9dric_Villemain?=
> writes:
>> 2010/8/16 Tom Lane :
>>> =?ISO-8859-1?Q?C=E9dric_Villemain?=
>>> writes:
Unfortunely the current implementation of EXECUTE USING is not working
this way.
>>>
>>> Uh ... what do you base that statement on?
>
>> Abo
=?ISO-8859-1?Q?C=E9dric_Villemain?= writes:
> 2010/8/16 Tom Lane :
>> =?ISO-8859-1?Q?C=E9dric_Villemain?=
>> writes:
>>> Unfortunely the current implementation of EXECUTE USING is not working
>>> this way.
>>
>> Uh ... what do you base that statement on?
> About the planning behavior ?
> With
2010/8/16 Tom Lane :
> =?ISO-8859-1?Q?C=E9dric_Villemain?=
> writes:
>> Yes, and you point out another thing. EXECUTE is a way to bypass the
>> named prepare statement, to be sure query is replanned each time.
>> Unfortunely the current implementation of EXECUTE USING is not working
>> this way.
On 16/08/10 03:35, Tom Lane wrote:
Heikki Linnakangas writes:
One approach is to handle the conversion from unknown to the right data
type transparently in the backend. Attached patch adds a
coerce-param-hook for fixed params that returns a CoerceViaIO node to
convert the param to the right typ
=?ISO-8859-1?Q?C=E9dric_Villemain?= writes:
> Yes, and you point out another thing. EXECUTE is a way to bypass the
> named prepare statement, to be sure query is replanned each time.
> Unfortunely the current implementation of EXECUTE USING is not working
> this way.
Uh ... what do you base that
2010/8/5 Heikki Linnakangas :
> There's a little problem with EXECUTE USING when the parameters are of type
> unknown (going back to 8.4 where EXECUTE USING was introduced):
>
> do $$
> BEGIN
> EXECUTE 'SELECT to_date($1, $2)' USING '17-DEC-80', 'DD-MON-YY';
> END;
> $$;
> ERROR: failed to find c
Heikki Linnakangas writes:
> One approach is to handle the conversion from unknown to the right data
> type transparently in the backend. Attached patch adds a
> coerce-param-hook for fixed params that returns a CoerceViaIO node to
> convert the param to the right type at runtime. That's quite
On 06/08/10 01:13, Tom Lane wrote:
Andrew Dunstan writes:
On 08/05/2010 05:11 PM, Tom Lane wrote:
This example doesn't seem terribly compelling. Why would you bother
using USING with constants?
In a more complex example you might use $1 in more than one place in the
query.
Well, that's b
On 06/08/10 01:13, Tom Lane wrote:
Andrew Dunstan writes:
On 08/05/2010 05:11 PM, Tom Lane wrote:
This example doesn't seem terribly compelling. Why would you bother
using USING with constants?
In a more complex example you might use $1 in more than one place in the
query.
Well, that's b
Andrew Dunstan writes:
> On 08/05/2010 05:11 PM, Tom Lane wrote:
>> This example doesn't seem terribly compelling. Why would you bother
>> using USING with constants?
> In a more complex example you might use $1 in more than one place in the
> query.
Well, that's better than no justification,
On 08/05/2010 05:11 PM, Tom Lane wrote:
Heikki Linnakangas writes:
There's a little problem with EXECUTE USING when the parameters are of
type unknown (going back to 8.4 where EXECUTE USING was introduced):
do $$
BEGIN
EXECUTE 'SELECT to_date($1, $2)' USING '17-DEC-80', 'DD-MON-YY';
END;
Heikki Linnakangas writes:
> There's a little problem with EXECUTE USING when the parameters are of
> type unknown (going back to 8.4 where EXECUTE USING was introduced):
> do $$
> BEGIN
>EXECUTE 'SELECT to_date($1, $2)' USING '17-DEC-80', 'DD-MON-YY';
> END;
> $$;
> ERROR: failed to find c
Hello
2010/8/5 Heikki Linnakangas :
> There's a little problem with EXECUTE USING when the parameters are of type
> unknown (going back to 8.4 where EXECUTE USING was introduced):
>
> do $$
> BEGIN
> EXECUTE 'SELECT to_date($1, $2)' USING '17-DEC-80', 'DD-MON-YY';
> END;
> $$;
> ERROR: failed to
There's a little problem with EXECUTE USING when the parameters are of
type unknown (going back to 8.4 where EXECUTE USING was introduced):
do $$
BEGIN
EXECUTE 'SELECT to_date($1, $2)' USING '17-DEC-80', 'DD-MON-YY';
END;
$$;
ERROR: failed to find conversion function from unknown to text
CONT
17 matches
Mail list logo