postgresql/src
Tom Lane 8df167baa7 In transformRowExpr(), check for too many columns in the row.
A RowExpr with more than MaxTupleAttributeNumber columns would fail at
execution anyway, since we cannot form a tuple datum with more than that
many columns.  While heap_form_tuple() has a check for too many columns,
it emerges that there are some intermediate bits of code that don't
check and can be driven to failure with sufficiently many columns.
Checking this at parse time seems like the most appropriate place to
install a defense, since we already check SELECT list length there.

While at it, make the SELECT-list-length error use the same errcode
(TOO_MANY_COLUMNS) as heap_form_tuple does, rather than the generic
PROGRAM_LIMIT_EXCEEDED.

Per bug #17561 from Egor Chindyaskin.  The given test case crashes
in all supported branches (and probably a lot further back),
so patch all.

Discussion: https://postgr.es/m/17561-80350151b9ad2ad4@postgresql.org
2022-07-29 13:30:50 -04:00
..
backend In transformRowExpr(), check for too many columns in the row. 2022-07-29 13:30:50 -04:00
bin pg_upgrade: Adjust quoting style in message to match guidelines 2022-07-18 14:55:54 +02:00
common Fix get_dirent_type() for symlinks on MinGW/MSYS. 2022-07-28 14:27:06 +12:00
fe_utils Allow db.schema.table patterns, but complain about random garbage. 2022-04-20 11:39:44 -04:00
include Allow "in place" tablespaces. 2022-07-27 07:55:13 +02:00
interfaces Plug memory leak 2022-07-13 12:10:03 +02:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl Fix SPI's handling of errors during transaction commit. 2022-06-22 12:11:59 -04:00
port Fix get_dirent_type() for Windows junction points. 2022-07-22 16:57:57 +12:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Fix test instability 2022-07-29 12:50:47 +02:00
timezone Update time zone data files to tzdata release 2022a. 2022-05-05 14:55:03 -04:00
tools Improve setup of environment values for commands in MSVC's vcregress.pl 2022-05-11 10:22:29 +09:00
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Add module build directory to the PATH for TAP tests 2021-10-22 09:50:16 -04:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:28:02 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00