28 #define NO_LZ4_SUPPORT() \
30 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
31 errmsg("compression method lz4 not supported"), \
32 errdetail("This functionality requires the server to be built with lz4 support.")))
52 if (valsize < PGLZ_strategy_default->min_input_size ||
156 max_size = LZ4_compressBound(valsize);
225 if (LZ4_versionNumber() < 10803)
287 if (strcmp(compression,
"pglz") == 0)
289 else if (strcmp(compression,
"lz4") == 0)
313 elog(
ERROR,
"invalid compression method %c", method);
#define VARATT_EXTERNAL_GET_POINTER(toast_pointer, attr)
int errmsg_internal(const char *fmt,...)
int errcode(int sqlerrcode)
#define ereport(elevel,...)
void pfree(void *pointer)
#define ERRCODE_DATA_CORRUPTED
const PGLZ_Strategy *const PGLZ_strategy_default
int32 pglz_decompress(const char *source, int32 slen, char *dest, int32 rawsize, bool check_complete)
int32 pglz_compress(const char *source, int32 slen, char *dest, const PGLZ_Strategy *strategy)
#define PGLZ_MAX_OUTPUT(_dlen)
struct varlena * lz4_decompress_datum(const struct varlena *value)
struct varlena * lz4_decompress_datum_slice(const struct varlena *value, int32 slicelength)
int default_toast_compression
struct varlena * pglz_decompress_datum(const struct varlena *value)
struct varlena * pglz_decompress_datum_slice(const struct varlena *value, int32 slicelength)
const char * GetCompressionMethodName(char method)
struct varlena * lz4_compress_datum(const struct varlena *value)
struct varlena * pglz_compress_datum(const struct varlena *value)
char CompressionNameToMethod(const char *compression)
ToastCompressionId toast_get_compression_id(struct varlena *attr)
@ TOAST_INVALID_COMPRESSION_ID
#define TOAST_PGLZ_COMPRESSION
#define InvalidCompressionMethod
#define TOAST_LZ4_COMPRESSION
#define VARATT_IS_EXTERNAL_ONDISK(PTR)
#define SET_VARSIZE_COMPRESSED(PTR, len)
#define VARATT_EXTERNAL_GET_COMPRESS_METHOD(toast_pointer)
#define VARDATA_COMPRESSED_GET_EXTSIZE(PTR)
#define VARATT_EXTERNAL_IS_COMPRESSED(toast_pointer)
#define VARATT_IS_COMPRESSED(PTR)
#define VARHDRSZ_COMPRESSED
#define SET_VARSIZE(PTR, len)
#define VARDATA_COMPRESSED_GET_COMPRESS_METHOD(PTR)
#define VARSIZE_ANY_EXHDR(PTR)