aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/array_userfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-02-27 23:48:10 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-02-27 23:48:10 +0000
commit234a02b2a888cacc4c09363cc1411ae4eac9bb51 (patch)
tree4aadb74b5d7bbcfc3cdae9c8703eac168d6108ae /src/backend/utils/adt/array_userfuncs.c
parent0459b591fc90b197ed31923b170c658cc30758d5 (diff)
downloadpostgresql-234a02b2a888cacc4c09363cc1411ae4eac9bb51.tar.gz
postgresql-234a02b2a888cacc4c09363cc1411ae4eac9bb51.zip
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/adt/array_userfuncs.c')
-rw-r--r--src/backend/utils/adt/array_userfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/array_userfuncs.c b/src/backend/utils/adt/array_userfuncs.c
index 1dad5210156..0745f1e1d2a 100644
--- a/src/backend/utils/adt/array_userfuncs.c
+++ b/src/backend/utils/adt/array_userfuncs.c
@@ -6,7 +6,7 @@
* Copyright (c) 2003-2007, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.21 2007/01/05 22:19:39 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.22 2007/02/27 23:48:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -376,7 +376,7 @@ array_cat(PG_FUNCTION_ARGS)
nbytes = ndatabytes + ARR_OVERHEAD_NONULLS(ndims);
}
result = (ArrayType *) palloc(nbytes);
- result->size = nbytes;
+ SET_VARSIZE(result, nbytes);
result->ndim = ndims;
result->dataoffset = dataoffset;
result->elemtype = element_type;