PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/detoast.h"
#include "access/toast_compression.h"
#include "common/pg_lzcompress.h"
#include "varatt.h"
Go to the source code of this file.
Macros | |
#define | NO_LZ4_SUPPORT() |
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 | |
int | default_toast_compression = TOAST_PGLZ_COMPRESSION |
#define NO_LZ4_SUPPORT | ( | ) |
Definition at line 28 of file toast_compression.c.
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().
int default_toast_compression = TOAST_PGLZ_COMPRESSION |
Definition at line 26 of file toast_compression.c.
Referenced by toast_compress_datum().