Re: WIP: Allow SQL-language functions to reference parameters by parameter name

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Matthew Draper <matthew(at)trebex(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Date: 2011-04-05 16:21:20
Message-ID: BANLkTingTngVenpQ1Hsh76BwMROr1gSk0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 25, 2011 at 10:05 PM, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> On Mar 25, 2011, at 9:12 PM, Robert Haas wrote:
>
>>
>> As I've said before, I believe that the root cause of this problem is
>> that using the same syntax for variables and column names is a bad
>> idea in the first place.  If we used $foo or ?foo or ${foo} or $.foo
>> or &&foo!!$#? to mean "the parameter called foo", then this would all
>> be a non-issue.
>
> Yes *please*. Man that would make maintenance of such functions easier.

+1 on using $foo. Even with the standardization risk I think it's the
best choice. Prefer $"foo" to ${foo} though.

merlin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-04-05 16:25:42 Re: Re: [COMMITTERS] pgsql: Support comments on FOREIGN DATA WRAPPER and SERVER objects.
Previous Message Merlin Moncure 2011-04-05 15:59:13 Re: Set hint bits upon eviction from BufMgr