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

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 43b46aae12b220b7eca8250c6c361083f35985a0
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2024-01-05T19:32:34Z
Releases: 17.0
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

Files

Discussion