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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the
Date: 2010-08-19 13:47:17
Message-ID: 26494.1282225637@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> 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 throw a nicer error message if
> you pass an unknown parameter in the USING clause.

+1 for the latter. There's no good reason to be passing unknowns to USING.
I'm also getting more and more uncomfortable with the amount of new
behavior that's being pushed into an existing SPI call.

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 below the SPI call.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2010-08-19 15:08:25 Re: Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the
Previous Message Heikki Linnakangas 2010-08-19 08:22:36 Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

Browse pgsql-hackers by date

  From Date Subject
Next Message Boxuan Zhai 2010-08-19 14:01:35 gSoC add MERGE command new patch -- merge_v104
Previous Message David Fetter 2010-08-19 13:46:28 Re: proposal: tuplestore, tuplesort aggregate functions