diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-30 18:38:47 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-30 18:38:47 +0000 |
commit | 1f5cc8c78aa3e600f3857f39e1b92bb9d019e68b (patch) | |
tree | 993c67d3b94ec50a46a200285d2c9d629af7d7f9 /src/backend/access/heap | |
parent | 59a9735fc814f66aa4b7a685557e790eb176f96c (diff) | |
download | postgresql-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/backend/access/heap')
-rw-r--r-- | src/backend/access/heap/heapam.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 7b60a897aa4..f345df7cc11 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.97 2000/11/30 08:46:20 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.98 2000/11/30 18:38:45 tgl Exp $ * * * INTERFACE ROUTINES @@ -535,18 +535,11 @@ fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, ((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]), (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)) |