I created a table in PGSQL (version 13) using the following command:
db1=# create table temp2(
foo int PRIMARY KEY,
bar varchar(20) UNIQUE NOT NULL
);
CREATE TABLE
The d
or d+
command does not list the associated indexes for the table (contrary to what I gathered from reading various sites.)
db1=# d temp2
foo | integer | | not null |
bar | character varying(20) | | not null |
db1=# d+ temp2
foo | integer | | not null | | plain | |
bar | character varying(20) | | not null | | extended | |
Is there a way I get list indexes associated with a table?
Thank you,
Ahmed.
2
Answers
You need di to get the index information. Check the manual:
You have
tuples_only
set toon
.Verify by doing: