Patch for cursor calling with named parameters

From: Yeb Havinga <yebhavinga(at)gmail(dot)com>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Patch for cursor calling with named parameters
Date: 2011-09-15 08:18:12
Message-ID: 4E71B4C4.3010004@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello list,

The following patch implements cursor calling with named parameters in
addition to the standard positional argument lists.

c1 cursor (param1 int, param2 int) for select * from rc_test where a >
param1 and b > param2;
open c1($1, $2); -- this is currently possible
open c1(param2 := $2, param1 := $1); -- this is the new feature

Especially for cursors with a lot of arguments, this increases
readability of code. This was discussed previously in
http://archives.postgresql.org/pgsql-hackers/2010-09/msg01433.php. We
actually made two patches: one with => and then one with := notation.
Attached is the patch with := notation.

Is it ok to add it to the next commitfest?

regards,
Yeb Havinga, Willem Dijkstra

--
Yeb Havinga
http://www.mgrid.net/
Mastering Medical Data

Attachment Content-Type Size
cursornamedparameter-v1.patch text/x-patch 14.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2011-09-15 08:44:46 Re: unite recovery.conf and postgresql.conf
Previous Message Fujii Masao 2011-09-15 07:54:50 Re: unite recovery.conf and postgresql.conf