Re: [HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread Heikki Linnakangas
On 19/08/10 18:08, Robert Haas wrote: On Thu, Aug 19, 2010 at 9:47 AM, Tom Lane wrote: Another possibility is for EXECUTE USING to coerce any unknowns to TEXT before it calls the parser at all. This would square with the typical default assumption for unknown literals, and it would avoid havin

Re: [HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread David E. Wheeler
On Aug 19, 2010, at 8:08 AM, Robert Haas wrote: >> Another possibility is for EXECUTE USING to coerce any unknowns to TEXT >> before it calls the parser at all. This would square with the typical >> default assumption for unknown literals, and it would avoid having to >> have any semantics change

Re: [HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread Robert Haas
On Thu, Aug 19, 2010 at 9:47 AM, Tom Lane wrote: > Another possibility is for EXECUTE USING to coerce any unknowns to TEXT > before it calls the parser at all.  This would square with the typical > default assumption for unknown literals, and it would avoid having to > have any semantics changes b

Re: [HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread Tom Lane
Heikki Linnakangas writes: > I'm starting to wonder if it's worth enforcing the rule that all unknown > Params must be coerced to the same target type. We could just document > the behavior. Or maybe we should revert the whole thing, and add a check > to PL/pgSQL EXECUTE USING code to just thro

[HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread Heikki Linnakangas
On 18/08/10 18:03, Heikki Linnakangas wrote: On 18/08/10 16:57, Tom Lane wrote: hei...@postgresql.org (Heikki Linnakangas) writes: Log Message: --- Coerce 'unknown' type parameters to the right type in the fixed-params parse_analyze() function. That case occurs e.g with PL/pgSQL EXECUTE