Re: [REVIEW] Patch for cursor calling with named parameters - Mailing list pgsql-hackers

From Royce Ausburn
Subject Re: [REVIEW] Patch for cursor calling with named parameters
Date
Msg-id 29A8127B-BB37-40DC-8FB6-833710DAB22C@inomial.com
Whole thread Raw
In response to Re: [REVIEW] Patch for cursor calling with named parameters  (Yeb Havinga <yebhavinga@gmail.com>)
Responses Re: [REVIEW] Patch for cursor calling with named parameters  (Yeb Havinga <yebhavinga@gmail.com>)
List pgsql-hackers
On 08/10/2011, at 1:56 AM, Yeb Havinga wrote:

> Attach is v2 of the patch.
>
> Mixed notation now raises an error.
>
> In contrast with what I said above, named parameter related errors are thrown before any syntax errors. I tested with
raisingsyntax errors first but the resulting code was a bit more ugly and the sql checking under a error condition
(i.e.double named parameter error means there is one parameter in short)  was causing serious errors. 
>
> Documentation was also added, regression tests updated.

I've tested this patch out and can confirm mixed notation produces an error:

psql:plsqltest.sql:27: ERROR:  mixing positional and named parameter assignment not allowed in cursor "cur1"
LINE 10:       open cur1( param2 := 4, 2, 5);

Just one small thing: it'd be nice to have an example for cursor declaration with named parameters.  Your patch adds
onefor opening a cursor, but not for declaring one. 

Other than that, I think the patch is good.  Everything works as advertised =)

--Royce



pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Buildfarm git failures
Next
From: Alexander Korotkov
Date:
Subject: Re: index-only scans