diff options
author | Tom Lane | 2007-02-28 22:44:38 +0000 |
---|---|---|
committer | Tom Lane | 2007-02-28 22:44:38 +0000 |
commit | 9f652d430fbd1e757caaec9fe64d3e94c8693158 (patch) | |
tree | 9215d2131d85e73caeb96fe23ba442c17b8d4575 /contrib/tsearch2/query.h | |
parent | d1ce4f7396aac34233e075d0342ac704593799ce (diff) |
Fix up several contrib modules that were using varlena datatypes in not-so-obvious
ways. I'm not totally sure that I caught everything, but at least now they pass
their regression tests with VARSIZE/SET_VARSIZE defined to reverse byte order.
Diffstat (limited to 'contrib/tsearch2/query.h')
-rw-r--r-- | contrib/tsearch2/query.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/tsearch2/query.h b/contrib/tsearch2/query.h index b4d586a684..44f8701213 100644 --- a/contrib/tsearch2/query.h +++ b/contrib/tsearch2/query.h @@ -28,12 +28,12 @@ typedef struct ITEM */ typedef struct { - int4 len; + int32 vl_len_; /* varlena header (do not touch directly!) */ int4 size; char data[1]; } QUERYTYPE; -#define HDRSIZEQT ( 2 * sizeof(int4) ) +#define HDRSIZEQT ( VARHDRSZ + sizeof(int4) ) #define COMPUTESIZE(size,lenofoperand) ( HDRSIZEQT + (size) * sizeof(ITEM) + (lenofoperand) ) #define GETQUERY(x) (ITEM*)( (char*)(x)+HDRSIZEQT ) #define GETOPERAND(x) ( (char*)GETQUERY(x) + ((QUERYTYPE*)(x))->size * sizeof(ITEM) ) |