aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-07-29 13:30:50 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-07-29 13:30:50 -0400
commitba2002d02cf4d6790d82d3b9ffd5d7a74a1c9589 (patch)
treea3953fa8f609d2e84b85e56aa66f964d93b1c298 /src/backend/executor
parent7cfe688dee86c10ed2622872f5b2f8ca9b1b7c5b (diff)
downloadpostgresql-ba2002d02cf4d6790d82d3b9ffd5d7a74a1c9589.tar.gz
postgresql-ba2002d02cf4d6790d82d3b9ffd5d7a74a1c9589.zip
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
Diffstat (limited to 'src/backend/executor')
0 files changed, 0 insertions, 0 deletions