pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove PLPGSQL_DTYPE_ARRAYELEM datum type within pl/pgsql.
Date: Mon, 04 Jan 2021 17:39:40 +0000
Message-ID: <E1kwTpU-0000yV-QM@gemulon.postgresql.org> (raw)

Remove PLPGSQL_DTYPE_ARRAYELEM datum type within pl/pgsql.

In the wake of the previous commit, we don't really need this anymore,
since array assignment is primarily handled by the core code.

The only way that that code could still be reached is that a GET
DIAGNOSTICS target variable could be an array element.  But that
doesn't seem like a particularly essential feature.  I'd added it
in commit 55caaaeba, but just because it was easy not because
anyone had actually asked for it.  Hence, revert that patch and
then remove the now-unreachable stuff.  (If we really had to,
we could probably reimplement GET DIAGNOSTICS using the new
assignment machinery; but the cost/benefit ratio looks very poor,
and it'd likely be a bit slower.)

Note that PLPGSQL_DTYPE_RECFIELD remains.  It's possible that we
could get rid of that too, but maintaining the existing behaviors
for RECORD-type variables seems like it might be difficult.  Since
there's not any functional limitation in those code paths as there
was in the ARRAYELEM code, I've not pursued the idea.

Discussion: https://postgr.es/m/4165684.1607707277@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1788828d33516809fa2d842bf6e273d78e21d957

Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c          | 204 +---------------------------------
src/pl/plpgsql/src/pl_funcs.c         |   9 --
src/pl/plpgsql/src/pl_gram.y          |  52 +++------
src/pl/plpgsql/src/plpgsql.h          |  27 +----
src/test/regress/expected/plpgsql.out |  10 +-
src/test/regress/sql/plpgsql.sql      |  10 +-
6 files changed, 26 insertions(+), 286 deletions(-)



Message-ID: <E1kwTpU-0000yV-QM@gemulon.postgresql.org>
Permalink:  ../E1kwTpU-0000yV-QM@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kwTpU-0000yV-QM@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Remove PLPGSQL_DTYPE_ARRAYELEM datum type within pl/pgsql.
  In-Reply-To: <E1kwTpU-0000yV-QM@gemulon.postgresql.org>
  References: <E1kwTpU-0000yV-QM@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox