pgsql: Clean up some edge cases in plpgsql's %TYPE parsing.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Clean up some edge cases in plpgsql's %TYPE parsing.
Date: 2024-01-05 19:32:42
Message-ID: E1rLpvu-0003OS-FJ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Clean up some edge cases in plpgsql's %TYPE parsing.

Support referencing a composite-type variable in %TYPE.

Remove the undocumented, untested, and pretty useless ability
to have the subject of %TYPE be an (unqualified) type name.
You get the same result by just not writing %TYPE.

Add or adjust some test cases to improve code coverage here.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/43b46aae12b220b7eca8250c6c361083f35985a0

Modified Files
--------------
src/pl/plpgsql/src/expected/plpgsql_record.out | 46 +++++++++++++++++++
src/pl/plpgsql/src/pl_comp.c | 61 ++++++++++----------------
src/pl/plpgsql/src/sql/plpgsql_record.sql | 40 +++++++++++++++++
src/test/regress/expected/plpgsql.out | 10 ++---
src/test/regress/sql/plpgsql.sql | 8 ++--
5 files changed, 119 insertions(+), 46 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2024-01-06 12:10:09 pgsql: Fix the issue that SJE mistakenly omits qual clauses
Previous Message Andrew Dunstan 2024-01-05 13:23:16 pgsql: Add copyright notices to a few perl scripts that don't have them