aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/heapam.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-11-30 18:38:47 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-11-30 18:38:47 +0000
commit1f5cc8c78aa3e600f3857f39e1b92bb9d019e68b (patch)
tree993c67d3b94ec50a46a200285d2c9d629af7d7f9 /src/include/access/heapam.h
parent59a9735fc814f66aa4b7a685557e790eb176f96c (diff)
downloadpostgresql-1f5cc8c78aa3e600f3857f39e1b92bb9d019e68b.tar.gz
postgresql-1f5cc8c78aa3e600f3857f39e1b92bb9d019e68b.zip
Remove VARLENA_FIXED_SIZE hack, which is irreversibly broken now that
both MULTIBYTE and TOAST prevent char(n) from being truly fixed-size. Simplify and speed up fastgetattr() and index_getattr() macros by eliminating special cases for attnum=1. It's just as fast to handle the first attribute by presetting its attcacheoff to zero; so do that instead when loading the tupledesc in relcache.c.
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r--src/include/access/heapam.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index de4f2934853..db40344dc46 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: heapam.h,v 1.58 2000/11/21 21:16:05 petere Exp $
+ * $Id: heapam.h,v 1.59 2000/11/30 18:38:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -107,18 +107,11 @@ extern Datum nocachegetattr(HeapTuple tup, int attnum,
((isnull) ? (*(isnull) = false) : (dummyret)NULL), \
HeapTupleNoNulls(tup) ? \
( \
- ((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 || \
- (attnum) == 1) ? \
+ (tupleDesc)->attrs[(attnum)-1]->attcacheoff >= 0 ? \
( \
- (Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \
+ (Datum) fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \
(char *) (tup)->t_data + (tup)->t_data->t_hoff + \
- ( \
- ((attnum) != 1) ? \
- (tupleDesc)->attrs[(attnum)-1]->attcacheoff \
- : \
- 0 \
- ) \
- ) \
+ (tupleDesc)->attrs[(attnum)-1]->attcacheoff) \
) \
: \
nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) \