summaryrefslogtreecommitdiff
path: root/src/include/access/toast_compression.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/access/toast_compression.h')
-rw-r--r--src/include/access/toast_compression.h24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/include/access/toast_compression.h b/src/include/access/toast_compression.h
index 9e2c1cbe1a6..c992ece4c4a 100644
--- a/src/include/access/toast_compression.h
+++ b/src/include/access/toast_compression.h
@@ -23,16 +23,16 @@
extern int default_toast_compression;
/*
- * Built-in compression method-id. The toast compression header will store
+ * Built-in compression method ID. The toast compression header will store
* this in the first 2 bits of the raw length. These built-in compression
- * method-id are directly mapped to the built-in compression methods.
+ * method IDs are directly mapped to the built-in compression methods.
*
* Don't use these values for anything other than understanding the meaning
* of the raw bits from a varlena; in particular, if the goal is to identify
* a compression method, use the constants TOAST_PGLZ_COMPRESSION, etc.
* below. We might someday support more than 4 compression methods, but
* we can never have more than 4 values in this enum, because there are
- * only 2 bits available in the places where this is used.
+ * only 2 bits available in the places where this is stored.
*/
typedef enum ToastCompressionId
{
@@ -42,8 +42,9 @@ typedef enum ToastCompressionId
} ToastCompressionId;
/*
- * Built-in compression methods. pg_attribute will store this in the
- * attcompression column.
+ * Built-in compression methods. pg_attribute will store these in the
+ * attcompression column. In attcompression, InvalidCompressionMethod
+ * denotes the default behavior.
*/
#define TOAST_PGLZ_COMPRESSION 'p'
#define TOAST_LZ4_COMPRESSION 'l'
@@ -51,19 +52,6 @@ typedef enum ToastCompressionId
#define CompressionMethodIsValid(cm) ((cm) != InvalidCompressionMethod)
-#define IsStorageCompressible(storage) ((storage) != TYPSTORAGE_PLAIN && \
- (storage) != TYPSTORAGE_EXTERNAL)
-
-/*
- * GetDefaultToastCompression -- get the default toast compression method
- *
- * This exists to hide the use of the default_toast_compression GUC variable.
- */
-static inline char
-GetDefaultToastCompression(void)
-{
- return (char) default_toast_compression;
-}
/* pglz compression/decompression routines */
extern struct varlena *pglz_compress_datum(const struct varlena *value);