mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Use FLEXIBLE_ARRAY_MEMBER in struct varlena.
This forces some minor coding adjustments in tuptoaster.c and inv_api.c, but the new coding there is cleaner anyway. Michael Paquier
This commit is contained in:
@ -1365,11 +1365,13 @@ toast_save_datum(Relation rel, Datum value,
|
||||
CommandId mycid = GetCurrentCommandId(true);
|
||||
struct varlena *result;
|
||||
struct varatt_external toast_pointer;
|
||||
struct
|
||||
union
|
||||
{
|
||||
struct varlena hdr;
|
||||
char data[TOAST_MAX_CHUNK_SIZE]; /* make struct big enough */
|
||||
int32 align_it; /* ensure struct is aligned well enough */
|
||||
/* this is to make the union big enough for a chunk: */
|
||||
char data[TOAST_MAX_CHUNK_SIZE + VARHDRSZ];
|
||||
/* ensure union is aligned well enough: */
|
||||
int32 align_it;
|
||||
} chunk_data;
|
||||
int32 chunk_size;
|
||||
int32 chunk_seq = 0;
|
||||
|
Reference in New Issue
Block a user