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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: David Fetter <david(at)fetter(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-03-27 16:52:03
Message-ID: AANLkTinYbEbA7gtxzOykeeK_-4dpxGBbQ8kK1J2i3bJM@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/3/27 Andrew Dunstan <andrew(at)dunslane(dot)net>:
>
>
> On 03/27/2011 09:42 AM, David Fetter wrote:
>>
>> On Fri, Mar 25, 2011 at 09:12:33PM -0400, 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.
>>
>> How about psql's :foo syntax?
>>
>>
>
> Surely the time has long gone when we could have made such a choice. And the
> choice was not made in a vacuum.
>

Syntax for named parameters should be consistent with prepared
statement. Is there any comments in standard?

Regards

Pavel

SQL/PSM doesn't use any prefix - but it is little bit different
chapter then prepared statements.

> cheers
>
> andrew
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message SUBHAM ROY 2011-03-27 17:01:48 Re: Needs Suggestion
Previous Message Tom Lane 2011-03-27 16:51:13 pgsql: Fix plpgsql to release SPI plans when a function or DO block is