PRIMARY KEY parameters

Started by Igor Korotabout 2 months ago2 messagesgeneral
Jump to latest
#1Igor Korot
ikorot01@gmail.com

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

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Igor Korot (#1)
Re: PRIMARY KEY parameters

On Fri, Feb 13, 2026 at 7:29 PM Igor Korot <ikorot01@gmail.com> wrote:

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?

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.