diff options
author | Bruce Momjian <bruce@momjian.us> | 1997-08-24 23:08:01 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1997-08-24 23:08:01 +0000 |
commit | c4cb617504a6e7990de0416b0d18d1dadf176d6c (patch) | |
tree | b38bf26650cb9b6fb54a2a3df05624854f661a72 /src/backend/access/common/heaptuple.c | |
parent | 281ba3f40d023dbe0b03f2d76f3c854c3232664f (diff) | |
download | postgresql-c4cb617504a6e7990de0416b0d18d1dadf176d6c.tar.gz postgresql-c4cb617504a6e7990de0416b0d18d1dadf176d6c.zip |
Major patch to speed up backend startup after profiling analysis.
Diffstat (limited to 'src/backend/access/common/heaptuple.c')
-rw-r--r-- | src/backend/access/common/heaptuple.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index 71d76a6fc2f..30961f4f549 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.19 1997/08/19 21:28:49 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.20 1997/08/24 23:07:26 momjian Exp $ * * NOTES * The old interface functions have been converted to macros @@ -695,26 +695,20 @@ heap_getattr(HeapTuple tup, if (attnum > (int) tup->t_natts) { *isnull = true; return ((char *) NULL); + } else if (attnum > 0) { + /* ---------------- + * take care of user defined attributes + * ---------------- + */ + return fastgetattr(tup, attnum, tupleDesc, isnull); + } else { + /* ---------------- + * take care of system attributes + * ---------------- + */ + *isnull = false; + return heap_getsysattr(tup, b, attnum); } - - /* ---------------- - * take care of user defined attributes - * ---------------- - */ - if (attnum > 0) { - char *datum; - datum = fastgetattr(tup, attnum, tupleDesc, isnull); - - return (datum); - } - - /* ---------------- - * take care of system attributes - * ---------------- - */ - *isnull = false; - return - heap_getsysattr(tup, b, attnum); } /* ---------------- |