Re: [REVIEW] Patch for cursor calling with named parameters

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Yeb Havinga" <yebhavinga(at)gmail(dot)com>, "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [REVIEW] Patch for cursor calling with named parameters
Date: 2011-12-05 17:09:06
Message-ID: 4EDCA652020000250004383E@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Yeb Havinga <yebhavinga(at)gmail(dot)com> wrote:

>> I personally tend to believe it doesn't even need to be an error.
>> There is no technical reason not to allow it. All the user needs
>> to do is make sure that the combination of named parameters and
>> the positional ones together are complete and not overlapping.
>> This is also in line with calling functions, where mixing named
>> and positional is allowed, as long as the positional arguments
>> are first. Personally I have no opinion what is best, include the
>> feature or give an error, and I removed the possibility during
>> the previous commitfest.
>
> If there's no technical reason not to allow them to be mixed, I
> would tend to favor consistency with parameter calling rules.
> Doing otherwise seems like to result in confusion and "bug"
> reports.

Er, that was supposed to read "I would tend to favor consistency
with function calling rules." As stated here:

http://www.postgresql.org/docs/9.1/interactive/sql-syntax-calling-funcs.html

| PostgreSQL also supports mixed notation, which combines positional
| and named notation. In this case, positional parameters are
| written first and named parameters appear after them.

> How do others feel?

If there are no objections, I suggest that Yeb implement the mixed
notation for cursor parameters.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2011-12-05 17:10:05 Re: Inlining comparators as a performance optimisation
Previous Message Tom Lane 2011-12-05 16:16:51 Re: Re: [PATCH] Caching for stable expressions with constant arguments v3