postgresql/src
Tom Lane fd96d14d95 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:31:10 -04:00
..
backend In transformRowExpr(), check for too many columns in the row. 2022-07-29 13:31:10 -04:00
bin Fix mistake in bbe08b8869. 2022-07-29 11:20:07 -04:00
common Fix get_dirent_type() for symlinks on MinGW/MSYS. 2022-07-28 14:26:12 +12:00
fe_utils Add xheader_width pset option to psql 2022-07-25 14:25:02 -04:00
include Clean up some residual confusion between OIDs and RelFileNumbers. 2022-07-28 10:20:29 -04:00
interfaces Fix [install]check in interfaces/libpq/Makefile 2022-07-22 20:15:11 +02:00
makefiles Default to hidden visibility for extension libraries where possible 2022-07-17 17:49:51 -07:00
pl Add PGDLLEXPORTS to some plpgsql function declarations 2022-07-20 10:24:50 +02:00
port Remove dead getpwuid_r replacement code. 2022-07-24 09:44:29 +12:00
template Remove HP-UX port. 2022-07-08 14:05:05 +12: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:54:53 -04:00
tools Split TuplesortPublic from Tuplesortstate 2022-07-27 08:28:10 +03:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05: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 Increase minimum supported GNU make version to 3.81. 2022-07-23 12:12:42 -04:00
Makefile.shlib Default to hidden visibility for extension libraries where possible 2022-07-17 17:49:51 -07:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00