aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/numeric.h
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/include/utils/numeric.h
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/include/utils/numeric.h')
-rw-r--r--src/include/utils/numeric.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/utils/numeric.h b/src/include/utils/numeric.h
index c4d9d69debe..cffba1e1641 100644
--- a/src/include/utils/numeric.h
+++ b/src/include/utils/numeric.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1998-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/utils/numeric.h,v 1.23 2007/01/05 22:19:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/numeric.h,v 1.24 2007/02/27 23:48:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -62,7 +62,7 @@
*/
typedef struct NumericData
{
- int32 varlen; /* Variable size (std varlena header) */
+ int32 vl_len_; /* varlena header (do not touch directly!) */
int16 n_weight; /* Weight of 1st digit */
uint16 n_sign_dscale; /* Sign + display scale */
char n_data[1]; /* Digits (really array of NumericDigit) */
@@ -70,7 +70,7 @@ typedef struct NumericData
typedef NumericData *Numeric;
-#define NUMERIC_HDRSZ (sizeof(int32) + sizeof(int16) + sizeof(uint16))
+#define NUMERIC_HDRSZ (VARHDRSZ + sizeof(int16) + sizeof(uint16))
/*