PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | TOAST_PGLZ_COMPRESSION 'p' |
#define | TOAST_LZ4_COMPRESSION 'l' |
#define | InvalidCompressionMethod '\0' |
#define | CompressionMethodIsValid(cm) ((cm) != InvalidCompressionMethod) |
Typedefs | |
typedef enum ToastCompressionId | ToastCompressionId |
Enumerations | |
enum | ToastCompressionId { TOAST_PGLZ_COMPRESSION_ID = 0 , TOAST_LZ4_COMPRESSION_ID = 1 , TOAST_INVALID_COMPRESSION_ID = 2 } |
Functions | |
struct varlena * | pglz_compress_datum (const struct varlena *value) |
struct varlena * | pglz_decompress_datum (const struct varlena *value) |
struct varlena * | pglz_decompress_datum_slice (const struct varlena *value, int32 slicelength) |
struct varlena * | lz4_compress_datum (const struct varlena *value) |
struct varlena * | lz4_decompress_datum (const struct varlena *value) |
struct varlena * | lz4_decompress_datum_slice (const struct varlena *value, int32 slicelength) |
ToastCompressionId | toast_get_compression_id (struct varlena *attr) |
char | CompressionNameToMethod (const char *compression) |
const char * | GetCompressionMethodName (char method) |
Variables | |
PGDLLIMPORT int | default_toast_compression |
#define CompressionMethodIsValid | ( | cm | ) | ((cm) != InvalidCompressionMethod) |
Definition at line 53 of file toast_compression.h.
#define InvalidCompressionMethod '\0' |
Definition at line 51 of file toast_compression.h.
#define TOAST_LZ4_COMPRESSION 'l' |
Definition at line 50 of file toast_compression.h.
#define TOAST_PGLZ_COMPRESSION 'p' |
Definition at line 49 of file toast_compression.h.
typedef enum ToastCompressionId ToastCompressionId |
enum ToastCompressionId |
Enumerator | |
---|---|
TOAST_PGLZ_COMPRESSION_ID | |
TOAST_LZ4_COMPRESSION_ID | |
TOAST_INVALID_COMPRESSION_ID |
Definition at line 37 of file toast_compression.h.
char CompressionNameToMethod | ( | const char * | compression | ) |
Definition at line 285 of file toast_compression.c.
References InvalidCompressionMethod, NO_LZ4_SUPPORT, TOAST_LZ4_COMPRESSION, and TOAST_PGLZ_COMPRESSION.
Referenced by GetAttributeCompression().
const char* GetCompressionMethodName | ( | char | method | ) |
Definition at line 304 of file toast_compression.c.
References elog, ERROR, TOAST_LZ4_COMPRESSION, and TOAST_PGLZ_COMPRESSION.
Referenced by MergeAttributes(), and transformTableLikeClause().
Definition at line 139 of file toast_compression.c.
References elog, ERROR, len, NO_LZ4_SUPPORT, palloc(), pfree(), SET_VARSIZE_COMPRESSED, value, VARDATA_ANY, VARHDRSZ_COMPRESSED, and VARSIZE_ANY_EXHDR.
Referenced by toast_compress_datum().
Definition at line 182 of file toast_compression.c.
References ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg_internal(), ERROR, NO_LZ4_SUPPORT, palloc(), SET_VARSIZE, value, VARDATA, VARDATA_COMPRESSED_GET_EXTSIZE, VARHDRSZ, VARHDRSZ_COMPRESSED, and VARSIZE.
Referenced by lz4_decompress_datum_slice(), and toast_decompress_datum().
Definition at line 215 of file toast_compression.c.
References ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg_internal(), ERROR, lz4_decompress_datum(), NO_LZ4_SUPPORT, palloc(), SET_VARSIZE, value, VARDATA, VARHDRSZ, VARHDRSZ_COMPRESSED, and VARSIZE.
Referenced by toast_decompress_datum_slice().
Definition at line 40 of file toast_compression.c.
References len, PGLZ_Strategy::max_input_size, palloc(), pfree(), pglz_compress(), PGLZ_MAX_OUTPUT, PGLZ_strategy_default, SET_VARSIZE_COMPRESSED, value, VARDATA_ANY, VARHDRSZ_COMPRESSED, and VARSIZE_ANY_EXHDR.
Referenced by toast_compress_datum().
Definition at line 82 of file toast_compression.c.
References ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg_internal(), ERROR, palloc(), pglz_decompress(), SET_VARSIZE, value, VARDATA, VARDATA_COMPRESSED_GET_EXTSIZE, VARHDRSZ, VARHDRSZ_COMPRESSED, and VARSIZE.
Referenced by toast_decompress_datum().
Definition at line 109 of file toast_compression.c.
References ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg_internal(), ERROR, palloc(), pglz_decompress(), SET_VARSIZE, value, VARDATA, VARHDRSZ, VARHDRSZ_COMPRESSED, and VARSIZE.
Referenced by toast_decompress_datum_slice().
ToastCompressionId toast_get_compression_id | ( | struct varlena * | attr | ) |
Definition at line 254 of file toast_compression.c.
References TOAST_INVALID_COMPRESSION_ID, VARATT_EXTERNAL_GET_COMPRESS_METHOD, VARATT_EXTERNAL_GET_POINTER, VARATT_EXTERNAL_IS_COMPRESSED, VARATT_IS_COMPRESSED, VARATT_IS_EXTERNAL_ONDISK, and VARDATA_COMPRESSED_GET_COMPRESS_METHOD.
Referenced by pg_column_compression().
|
extern |
Definition at line 26 of file toast_compression.c.
Referenced by toast_compress_datum().