mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
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
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/varbit.h,v 1.25 2007/01/05 22:20:00 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/varbit.h,v 1.26 2007/02/27 23:48:10 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,8 +22,7 @@
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32 vl_len; /* standard varlena header (total size in
|
||||
* bytes) */
|
||||
int32 vl_len_; /* varlena header (do not touch directly!) */
|
||||
int32 bit_len; /* number of valid bits */
|
||||
bits8 bit_dat[1]; /* bit string, most sig. byte first */
|
||||
} VarBit;
|
||||
|
||||
Reference in New Issue
Block a user