mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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.
This commit is contained in:
@ -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) )
|
||||
|
Reference in New Issue
Block a user