diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-02-27 23:48:10 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-02-27 23:48:10 +0000 |
commit | 234a02b2a888cacc4c09363cc1411ae4eac9bb51 (patch) | |
tree | 4aadb74b5d7bbcfc3cdae9c8703eac168d6108ae /src/backend/utils/cache/relcache.c | |
parent | 0459b591fc90b197ed31923b170c658cc30758d5 (diff) |
Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len).
Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with
VARSIZE and VARDATA, and as a consequence almost no code was using the
longer names. Rename the length fields of struct varlena and various
derived structures to catch anyplace that was accessing them directly;
and clean up various places so caught. In itself this patch doesn't
change any behavior at all, but it is necessary infrastructure if we hope
to play any games with the representation of varlena headers.
Greg Stark and Tom Lane
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index da1f9fd9240..ae41b169c3d 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.255 2007/01/25 02:17:26 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.256 2007/02/27 23:48:09 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -3244,7 +3244,7 @@ load_relcache_init_file(void) rel->rd_options = palloc(len); if ((nread = fread(rel->rd_options, 1, len, fp)) != len) goto read_failed; - if (len != VARATT_SIZE(rel->rd_options)) + if (len != VARSIZE(rel->rd_options)) goto read_failed; /* sanity check */ } else @@ -3540,7 +3540,7 @@ write_relcache_init_file(void) /* next, do the access method specific field */ write_item(rel->rd_options, - (rel->rd_options ? VARATT_SIZE(rel->rd_options) : 0), + (rel->rd_options ? VARSIZE(rel->rd_options) : 0), fp); /* If it's an index, there's more to do */ |