Subject: PRIMARY KEY parameters

From: Igor Korot <[email-masked]>
Date: Fri, 13 Feb 2026 18:29:11 -0800

Hi,

Page https://www.postgresql.org/docs/9.1/sql-createtable.html states:

[quote]

[ CONSTRAINT constraint_name ]
{ NOT NULL |
  NULL |
  CHECK ( expression ) |
  DEFAULT default_expr |
  UNIQUE index_parameters |
  PRIMARY KEY index_parameters |
  REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL |
MATCH SIMPLE ]
    [ ON DELETE action ] [ ON UPDATE action ] }
[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
[/quote]

And then:

[quote]

index_parameters in UNIQUE, PRIMARY KEY, and EXCLUDE constraints are:

[ WITH ( storage_parameter [= value] [, ... ] ) ]
[ USING INDEX TABLESPACE tablespace ]
[/quote]

How can I retrieve those 2 parameters?

Thank you

X-Gm-Message-State: AOJu0YxClXpcm3ciQhWxYZVqekjvsyFmSzA29tzSV+PRIhNWyFiKblDL
	ojORXSwlT11wWAIiv9Y43bJp0b9RDJTqDcPQH3g2dvZ/KUiybVLlTppT5daWys/3mu2HEDGUjyL
	AEDgI+C0mLdIpIRf9dUSpHsmvyj7YdFkGdKvg
X-Gm-Gg: AZuq6aJK3m/YimGAThgM7miGFUbExo/r6YbQNdWnYypmk+vsoiAD3wMl2Tvy2Xv6tGi
	EOOxpBzNanY96hxNJ9xhwff3k5Ue8/dnAg0LKYR467Js6/yYNTIhCE24Wzo1sFQs5sP+UbT14gd
	vbt13n51aZLUFvC2cLw/nCKyKcAxczTL0Z6psPSRvXmxS+D2Lx6v4hpbzLngtaaQdTRijGdl8Z4
	xCXIpNFuiF2YOjyV3/xRzzfHIsMhvJKQaZvkKLtSDszFdkUgvh3ZhaxlEgFJuPZwu31CY5NXgKm
	mDl3rALtmcWHcBUDErdhH49RlscJk2DIrw+Ds2tJMf8gzJUPww==
X-Received: by 2002:a05:690e:4146:b0:64a:dafe:fb5 with SMTP id
 956f58d0204a3-64c197ae418mr3440665d50.23.1771036161219; Fri, 13 Feb 2026
 18:29:21 -0800 (PST)
MIME-Version: 1.0
From: Igor Korot <[email-masked]>
Date: Fri, 13 Feb 2026 18:29:11 -0800
X-Gm-Features: AZwV_QirqW8NamaGbbRW4YVoqJVisSjNPodMcFe3i-Rk8XYl_xPVejGta79tGSU
Message-ID: <[email-masked]>
Subject: PRIMARY KEY parameters
To: "pgsql-generallists.postgresql.org" <[email-masked]>
Content-Type: text/plain; charset="UTF-8"
List-Id: <pgsql-general.lists.postgresql.org>
List-Help: <https://lists.postgresql.org/manage/>
List-Subscribe: <https://lists.postgresql.org/manage/>
List-Post: <mailto:[email-masked]>
List-Owner: <mailto:[email-masked]>
List-Archive: <https://www.postgresql.org/list/pgsql-general>
Archived-At: <https://www.postgresql.org/message-id/CA%2BFnnTwQaGb6RPddObHQSd7UW37cUJOzXVETfDw%2BjeyaRFbr6w%40mail.gmail.com>
Precedence: bulk

Hi,

Page https://www.postgresql.org/docs/9.1/sql-createtable.html states:

[quote]

[ CONSTRAINT constraint_name ]
{ NOT NULL |
  NULL |
  CHECK ( expression ) |
  DEFAULT default_expr |
  UNIQUE index_parameters |
  PRIMARY KEY index_parameters |
  REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL |
MATCH SIMPLE ]
    [ ON DELETE action ] [ ON UPDATE action ] }
[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
[/quote]

And then:

[quote]

index_parameters in UNIQUE, PRIMARY KEY, and EXCLUDE constraints are:

[ WITH ( storage_parameter [= value] [, ... ] ) ]
[ USING INDEX TABLESPACE tablespace ]
[/quote]

How can I retrieve those 2 parameters?

Thank you

---

From: "David G. Johnston" <[email-masked]>
Date: Fri, 13 Feb 2026 20:04:15 -0700

> How can I retrieve those 2 parameters?
You'd have to look at the tablespace and storage parameters of the index in
question, it isn't a property of the table.  The indexes are immediately
created with those attributes.

David J.