diff options
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 87992769e99..15f61ce59a6 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.182 2002/12/15 21:01:34 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.183 2002/12/16 18:39:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -570,7 +570,8 @@ RelationBuildTupleDesc(RelationBuildDescInfo buildinfo, * cases for attnum=1 that used to exist in fastgetattr() and * index_getattr(). */ - relation->rd_att->attrs[0]->attcacheoff = 0; + if (relation->rd_rel->relnatts > 0) + relation->rd_att->attrs[0]->attcacheoff = 0; /* * Set up constraint/default info @@ -2049,7 +2050,7 @@ RelationBuildLocalRelation(const char *relname, int i; bool has_not_null; - AssertArg(natts > 0); + AssertArg(natts >= 0); /* * switch to the cache context to create the relcache entry. |