postgresql/src
Tom Lane e6e804aa27 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:11 -04:00
..
backend In transformRowExpr(), check for too many columns in the row. 2022-07-29 13:31:11 -04:00
bin Fix mistake in bbe08b8869. 2022-07-29 11:24:57 -04:00
common Fix get_dirent_type() for symlinks on MinGW/MSYS. 2022-07-28 14:27:28 +12:00
fe_utils Fix minor memory leaks in psql's tab completion. 2022-07-22 10:53:26 -04:00
include Force immediate commit after CREATE DATABASE etc in extended protocol. 2022-07-26 13:07:03 -04:00
interfaces Fix [install]check in interfaces/libpq/Makefile 2022-07-22 20:15:11 +02:00
makefiles Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
pl Fix missed corner cases for grantable permissions on GUCs. 2022-07-19 17:22:31 -04:00
port Fix get_dirent_type() for Windows junction points. 2022-07-22 16:57:36 +12:00
template Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01: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 expression eval: Fix EEOP_JSON_CONSTRUCTOR and EEOP_JSONEXPR size. 2022-07-05 11:26:27 -07:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
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 AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Improve frontend error logging style. 2022-04-08 14:55:14 -04:00