From a485ff1b04faf706f834f533066de61176d05cd4 Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 3 Apr 2026 11:00:09 -0700 Subject: [PATCH] pgsql: doc: Distinguish table and index storage parameters in CREATE TABLE The WITH clause in CREATE TABLE applies to both tables and constraint indexes, but uses a single storage_parameter placeholder in the syntax synopsis making the distinction unclear. Rename the placeholder to table_storage_parameter and index_storage_parameter respectively in the synopsis and add a separate term for the index variant in the WITH parameter description. Update the description to reference the index storage parameters section in CREATE INDEX directly rather than the top-level CREATE INDEX page. Also rename the Storage Parameters subsection to Table Storage Parameters to make clear it covers only table parameters. --- doc/src/sgml/ref/create_index.sgml | 8 ++++++-- doc/src/sgml/ref/create_table.sgml | 25 +++++++++++++++---------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index bb7505d171b..d50c71c0a11 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -25,7 +25,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] column_name | ( expression ) } [ COLLATE collation ] [ opclass [ ( opclass_parameter = value [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ] [, ...] ) [ INCLUDE ( column_name [, ...] ) ] [ NULLS [ NOT ] DISTINCT ] - [ WITH ( storage_parameter [= value] [, ... ] ) ] + [ WITH ( index_storage_parameter [= value] [, ... ] ) ] [ TABLESPACE tablespace_name ] [ WHERE predicate ] @@ -349,7 +349,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] - storage_parameter + index_storage_parameter The name of an index-method-specific storage parameter. See @@ -385,6 +385,10 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] Index Storage Parameters + + storage parameters + + The optional WITH clause specifies storage parameters for the index. Each index method has its own set diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 80829b23945..89a29430828 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -30,7 +30,7 @@ CREATE [ persistence_mode ] TABLE [ IF NOT EXISTS ] < [ INHERITS ( parent_table [, ... ] ) ] [ PARTITION BY { RANGE | LIST | HASH } ( { column_name | ( expression ) } [ COLLATE collation ] [ opclass ] [, ... ] ) ] [ USING method ] -[ WITH ( storage_parameter [= value] [, ... ] ) | WITHOUT OIDS ] +[ WITH ( table_storage_parameter [= value] [, ... ] ) | WITHOUT OIDS ] [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ] [ TABLESPACE tablespace_name ] @@ -42,7 +42,7 @@ CREATE [ persistence_mode ] TABLE [ IF NOT EXISTS ] < ) ] [ PARTITION BY { RANGE | LIST | HASH } ( { column_name | ( expression ) } [ COLLATE collation ] [ opclass ] [, ... ] ) ] [ USING method ] -[ WITH ( storage_parameter [= value] [, ... ] ) | WITHOUT OIDS ] +[ WITH ( table_storage_parameter [= value] [, ... ] ) | WITHOUT OIDS ] [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ] [ TABLESPACE tablespace_name ] @@ -54,7 +54,7 @@ CREATE [ persistence_mode ] TABLE [ IF NOT EXISTS ] < ) ] { FOR VALUES partition_bound_spec | DEFAULT } [ PARTITION BY { RANGE | LIST | HASH } ( { column_name | ( expression ) } [ COLLATE collation ] [ opclass ] [, ... ] ) ] [ USING method ] -[ WITH ( storage_parameter [= value] [, ... ] ) | WITHOUT OIDS ] +[ WITH ( table_storage_parameter [= value] [, ... ] ) | WITHOUT OIDS ] [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ] [ TABLESPACE tablespace_name ] @@ -112,7 +112,7 @@ WITH ( MODULUS numeric_literal, REM and index_parameters in UNIQUE, PRIMARY KEY, and EXCLUDE constraints are: [ INCLUDE ( column_name [, ... ] ) ] -[ WITH ( storage_parameter [= value] [, ... ] ) ] +[ WITH ( index_storage_parameter [= value] [, ... ] ) ] [ USING INDEX TABLESPACE tablespace_name ] and exclude_element in an EXCLUDE constraint is: @@ -1471,12 +1471,17 @@ WITH ( MODULUS numeric_literal, REM - WITH ( storage_parameter [= value] [, ... ] ) + WITH ( table_storage_parameter [= value] [, ... ] ) + WITH ( index_storage_parameter [= value] [, ... ] ) - This clause specifies optional storage parameters for a table or index; + These clauses specify optional storage parameters for tables and indexes respectively; see below for more - information. For backward-compatibility the WITH + information on table storage parameters. For index storage parameters + see . + + + For backward-compatibility the WITH clause for a table can also include OIDS=FALSE to specify that rows of the new table should not contain OIDs (object identifiers), OIDS=TRUE is not supported anymore. @@ -1575,8 +1580,8 @@ WITH ( MODULUS numeric_literal, REM - - Storage Parameters + + Table Storage Parameters storage parameters @@ -1587,7 +1592,7 @@ WITH ( MODULUS numeric_literal, REM for tables, and for indexes associated with a UNIQUE, PRIMARY KEY, or EXCLUDE constraint. Storage parameters for - indexes are documented in . + indexes are documented in The storage parameters currently available for tables are listed below. For many of these parameters, as shown, there is an additional parameter with the same name prefixed with -- 2.43.0