Check maximum number of columns in function RTEs, too.
authorTom Lane <[email protected]>
Mon, 1 Aug 2022 16:22:35 +0000 (12:22 -0400)
committerTom Lane <[email protected]>
Mon, 1 Aug 2022 16:22:35 +0000 (12:22 -0400)
commitd54fc7e676514bf04cf711469ca65c1d64801ae6
treed6b34e2d4369b200f72503509b70760ffa3c9e6e
parentc308003d22251370e0b908e4380f2208d441955a
Check maximum number of columns in function RTEs, too.

I thought commit fd96d14d9 had plugged all the holes of this sort,
but no, function RTEs could produce oversize tuples too, either
via long coldeflists or just from multiple functions in one RTE.
(I'm pretty sure the other variants of base RTEs aren't a problem,
because they ultimately refer to either a table or a sub-SELECT,
whose widths are enforced elsewhere.  But we explicitly allow join
RTEs to be overwidth, as long as you don't try to form their
tuple result.)

Per further discussion of bug #17561.  As before, patch all branches.

Discussion: https://postgr.es/m/17561-80350151b9ad2ad4@postgresql.org
src/backend/parser/parse_relation.c