Re: Patch for cursor calling with named parameters

From: Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>
To: Yeb Havinga <yebhavinga(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch for cursor calling with named parameters
Date: 2011-09-15 14:31:53
Message-ID: CAF6yO=066NxvXn40+5jUwY_wPHkQuY0fFfbjbYfRrdhCY4_dZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/9/15 Yeb Havinga <yebhavinga(at)gmail(dot)com>:
> 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?

I think it is, as you have provided a patch.

There exist also a mecanism to order the parameters of 'EXECUTE ...
USING ...' (it's using a cursor), can the current work benefit to
EXECUTE USING to use named parameters ?

> regards,
> Yeb Havinga, Willem Dijkstra
>
> --
> Yeb Havinga
> http://www.mgrid.net/
> Mastering Medical Data
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2011-09-15 14:32:06 Re: unite recovery.conf and postgresql.conf
Previous Message Robert Haas 2011-09-15 12:03:09 Re: Use of literal in SGML docs