In plpgsql, allow %TYPE and %ROWTYPE to be followed by array decoration.
Tom Lane <tgl@sss.pgh.pa.us>
In plpgsql, allow %TYPE and %ROWTYPE to be followed by array decoration. This provides the useful ability to declare a variable that is an array of the type of some other variable or some table column. Quan Zongliang, Pavel Stehule Discussion: https://postgr.es/m/ec4523e1-9e7e-f3ef-f9ce-bafd680ad6f6@yeah.net
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/plpgsql.sgml | modified | +26 −3 |
| src/pl/plpgsql/src/expected/plpgsql_array.out | modified | +79 −0 |
| src/pl/plpgsql/src/pl_comp.c | modified | +27 −0 |
| src/pl/plpgsql/src/pl_gram.y | modified | +57 −29 |
| src/pl/plpgsql/src/plpgsql.h | modified | +1 −0 |
| src/pl/plpgsql/src/sql/plpgsql_array.sql | modified | +71 −0 |
Documentation touched
Discussion
- PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[] 16 messages · 2023-10-16 → 2024-01-05