aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1998-02-05 15:08:49 +0000
committerMarc G. Fournier <scrappy@hub.org>1998-02-05 15:08:49 +0000
commitc10908e0d26531cdb5431adc1c8fd779fd8ee63a (patch)
tree8a2bd3f5d55793165e59e985f698abd1224efb80
parent692cfec8aa2b438014395b6f64b07cdae54827f6 (diff)
downloadpostgresql-c10908e0d26531cdb5431adc1c8fd779fd8ee63a.tar.gz
postgresql-c10908e0d26531cdb5431adc1c8fd779fd8ee63a.zip
Symptom:
select from a table with attrs (a int, b char(20)) crashed in bpcharout() (palloc of -1 bytes). But a table with attrs (a int, b varchar(20)) worked. From: Jan Wieck <jwieck@debis.com>
-rw-r--r--src/backend/access/common/heaptuple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c
index 5cd255285f8..2ab5673787d 100644
--- a/src/backend/access/common/heaptuple.c
+++ b/src/backend/access/common/heaptuple.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.33 1998/02/05 03:47:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.34 1998/02/05 15:08:49 scrappy Exp $
*
* NOTES
* The old interface functions have been converted to macros
@@ -554,7 +554,7 @@ nocachegetattr(HeapTuple tup,
while (att[j]->attcacheoff > 0)
j++;
- if (!VARLENA_FIXED_SIZE(att[j]))
+ if (!VARLENA_FIXED_SIZE(att[j - 1]))
off = att[j - 1]->attcacheoff + att[j - 1]->attlen;
else
off = att[j - 1]->attcacheoff + att[j - 1]->atttypmod;