diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/heap/tuptoaster.c | 5 | ||||
-rw-r--r-- | src/include/c.h | 4 | ||||
-rw-r--r-- | src/include/utils/inet.h | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/access/heap/tuptoaster.c b/src/backend/access/heap/tuptoaster.c index ca49ec9d93..a7fd6d0984 100644 --- a/src/backend/access/heap/tuptoaster.c +++ b/src/backend/access/heap/tuptoaster.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/heap/tuptoaster.c,v 1.81 2008/01/01 19:45:46 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/heap/tuptoaster.c,v 1.82 2008/02/23 19:11:45 tgl Exp $ * * * INTERFACE ROUTINES @@ -65,7 +65,8 @@ #define VARATT_EXTERNAL_GET_POINTER(toast_pointer, attr) \ do { \ varattrib_1b_e *attre = (varattrib_1b_e *) (attr); \ - Assert(VARSIZE_ANY_EXHDR(attre) == sizeof(toast_pointer)); \ + Assert(VARATT_IS_EXTERNAL(attre)); \ + Assert(VARSIZE_EXTERNAL(attre) == sizeof(toast_pointer) + VARHDRSZ_EXTERNAL); \ memcpy(&(toast_pointer), VARDATA_EXTERNAL(attre), sizeof(toast_pointer)); \ } while (0) diff --git a/src/include/c.h b/src/include/c.h index b66006200f..07a29d9cdf 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/c.h,v 1.222 2008/01/01 19:45:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/c.h,v 1.223 2008/02/23 19:11:45 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -410,7 +410,7 @@ typedef struct */ struct varlena { - int32 vl_len_; /* Do not touch this field directly! */ + char vl_len_[4]; /* Do not touch this field directly! */ char vl_dat[1]; }; diff --git a/src/include/utils/inet.h b/src/include/utils/inet.h index d102573f05..793e120785 100644 --- a/src/include/utils/inet.h +++ b/src/include/utils/inet.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/inet.h,v 1.28 2008/01/01 19:45:59 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/inet.h,v 1.29 2008/02/23 19:11:45 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -49,7 +49,7 @@ typedef struct */ typedef struct { - int32 vl_len_; /* Do not touch this field directly! */ + char vl_len_[4]; /* Do not touch this field directly! */ inet_struct inet_data; } inet; |