diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-04-05 01:59:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-04-05 01:59:01 +0000 |
commit | 0bcf76311f61d6897cb006f07767d5839a92c75d (patch) | |
tree | 4c178dbd2a8e518bbf0c0d69ad431ce1670b547f /src/include/access/attnum.h | |
parent | e409f5f14588da130e2289790ae5af84c56c5ed5 (diff) |
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.
Diffstat (limited to 'src/include/access/attnum.h')
-rw-r--r-- | src/include/access/attnum.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h index 16d16f5a9df..25f0d4ee368 100644 --- a/src/include/access/attnum.h +++ b/src/include/access/attnum.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: attnum.h,v 1.17 2003/08/04 02:40:10 momjian Exp $ + * $Id: attnum.h,v 1.17.4.1 2008/04/05 01:59:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,7 @@ typedef int16 AttrNumber; #define InvalidAttrNumber 0 +#define MaxAttrNumber 32767 /* ---------------- * support macros |