Re: proposal - plpgsql - support standard syntax for named arguments for cursors

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: proposal - plpgsql - support standard syntax for named arguments for cursors
Date: 2025-02-11 13:41:18
Message-ID: CAFj8pRA62rh8D-rnLQQkVKdMzkaqB3otyXxH0RwERPxDroD_qA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

so 8. 2. 2025 v 22:25 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:

> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > so 8. 2. 2025 v 20:25 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> >> Is there any reason to think that that's actually in the standard?
>
> > I think the possibility to use named arguments in OPEN statements is a
> > PostgreSQL proprietary feature.
> > And usage of cursors in PL/pgSQL is based on PL/SQL (not on SQL/PSM from
> > standard), but named
> > arguments for cursor is PostgreSQL proprietary feature and the syntax
> based
> > on usage `:=` is our
> > proprietary too.
>
> Hmm ... yeah, it's not in SQL/PSM, but looking at PL/SQL:
>
>
> https://docs.oracle.com/en/database/oracle/oracle-database/19/lnpls/OPEN-statement.html
>
> I see
>
> You can specify actual cursor parameters with either
> positional notation or named notation. For information about
> these notations, see "Positional, Named, and Mixed Notation
> for Actual Parameters".
>
> and that link blesses the use of "name => value" (and not ":=").
> So agreed, we should adjust this.
>
> Is there a reason we need a whole new test case instead of
> tweaking one of the existing ones?
>
>
I changed regress tests like you proposed

Regards

Pavel

> regards, tom lane
>

Attachment Content-Type Size
v20250211-0001-allow-to-use-standard-syntax-for-named-arguments-for.patch text/x-patch 3.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-02-11 14:05:18 Re: Move wal_buffers_full to WalUsage (and report it in pgss/explain)
Previous Message Nisha Moond 2025-02-11 13:36:49 Re: Introduce XID age and inactive timeout based replication slot invalidation