Additional doc fixes for configurable TOAST compression.
authorRobert Haas <rhaas@postgresql.org>
Thu, 6 May 2021 12:27:20 +0000 (08:27 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 6 May 2021 12:27:20 +0000 (08:27 -0400)
The grammar changes in commit bbe0a81db69bd10bd166907c3701492a29aca294
allow SET COMPRESSION to be used with ALTER MATERIALIZED VIEW as
well as with ALTER TABLE, so update those docs to say that it works.

Also, update the documentation for the pg_column_compression()
to explain that it will return NULL when there's no relevant value.

Patch by me, per concerns from Michael Paquier.

Discussion: http://postgr.es/m/CA+Tgmob9h5u4iNL9KM0drZgkY-JL4oCVW0dWrMqtLPQ1zHkquA@mail.gmail.com

doc/src/sgml/func.sgml
doc/src/sgml/ref/alter_materialized_view.sgml

index c60d98360ff898723cc3acf2f63fa8b51bc4a361..0b5571460de7856117243d7c3c970b49cc08b00e 100644 (file)
@@ -26256,7 +26256,8 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
        </para>
        <para>
         Shows the compression algorithm that was used to compress a
-        an individual variable-length value.
+        an individual variable-length value. Returns <literal>NULL</literal>
+        if the value is not compressed.
        </para></entry>
       </row>
 
index 27f60f6df59d0afb0e07ee4dda24fb7d2efc38c6..7011a0e7da04ed7f4440037e340c9ccfd5faf7f5 100644 (file)
@@ -40,6 +40,7 @@ ALTER MATERIALIZED VIEW ALL IN TABLESPACE <replaceable class="parameter">name</r
     ALTER [ COLUMN ] <replaceable class="parameter">column_name</replaceable> SET ( <replaceable class="parameter">attribute_option</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ] )
     ALTER [ COLUMN ] <replaceable class="parameter">column_name</replaceable> RESET ( <replaceable class="parameter">attribute_option</replaceable> [, ... ] )
     ALTER [ COLUMN ] <replaceable class="parameter">column_name</replaceable> SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
+    ALTER [ COLUMN ] <replaceable class="parameter">column_name</replaceable> SET COMPRESSION <replaceable class="parameter">compression_method</replaceable>
     CLUSTER ON <replaceable class="parameter">index_name</replaceable>
     SET WITHOUT CLUSTER
     SET ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )