From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: WIP: Allow SQL-language functions to reference parameters by parameter name |
Date: | 2011-04-14 21:16:24 |
Message-ID: | 20795.1302815784@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Apr 14, 2011 at 1:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Hmm, what I read Dimitri to be proposing is that we *require* parameter
>> names to be qualified with the function name. I don't recall hearing
>> that before. It would solve the problem perhaps, but I think the moans
>> and groans will be numerous.
> So far the most promising proposal I've seen seems to be to let id
> mean the parameter called id only when it can't refer to anything in
> the query.
> Tabula raza, I'd prefer your proposal to make any ambiguity an error,
> but it's not worth the breakage.
Yeah, I've come round to that position too. I think allowing parameter
names to be checked only after query names is probably the best answer.
> I'd be fine with having a way to
> explicitly request that behavior though, a la Perl's "use strict".
This is possible but it's not clear it's worth the work.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2011-04-14 21:20:32 | Re: WIP: Allow SQL-language functions to reference parameters by parameter name |
Previous Message | Merlin Moncure | 2011-04-14 21:13:47 | Re: Single client performance on trivial SELECTs |