Defend against JOINs having more than 32K columns altogether. We cannot

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 66f0f69a236cb5f8642492aa42977b860cd6ce0b
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-04-05T01:58:35Z
Releases: 8.2.8
Defend against JOINs having more than 32K columns altogether.  We cannot
currently support this because we must be able to build Vars referencing
join columns, and varattno is only 16 bits wide.  Perhaps this should be
improved in future, but considering that it never came up before, I'm not
sure the problem is worth much effort.  Per bug #4070 from Marcello
Ceschia.

The problem seems largely academic in 8.0 and 7.4, because they have
(different) O(N^2) performance issues with such wide joins, but
back-patch all the way anyway.

Files

PathChange+/−
src/backend/parser/parse_relation.c modified +11 −1
src/include/access/attnum.h modified +2 −1