1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

psql: Split up "Modifiers" column in \d and \dD

Make separate columns "Collation", "Nullable", "Default".

Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com>
This commit is contained in:
Peter Eisentraut
2016-11-03 12:00:00 -04:00
parent 1d15d0db50
commit a0f357e570
28 changed files with 1144 additions and 1176 deletions

View File

@ -416,12 +416,12 @@ CREATE TABLE replication_metadata (
WITH (user_catalog_table = true)
;
\d+ replication_metadata
Table "public.replication_metadata"
Column | Type | Modifiers | Storage | Stats target | Description
----------+---------+-------------------------------------------------------------------+----------+--------------+-------------
id | integer | not null default nextval('replication_metadata_id_seq'::regclass) | plain | |
relation | name | not null | plain | |
options | text[] | | extended | |
Table "public.replication_metadata"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
----------+---------+-----------+----------+--------------------------------------------------+----------+--------------+-------------
id | integer | | not null | nextval('replication_metadata_id_seq'::regclass) | plain | |
relation | name | | not null | | plain | |
options | text[] | | | | extended | |
Indexes:
"replication_metadata_pkey" PRIMARY KEY, btree (id)
Options: user_catalog_table=true
@ -430,12 +430,12 @@ INSERT INTO replication_metadata(relation, options)
VALUES ('foo', ARRAY['a', 'b']);
ALTER TABLE replication_metadata RESET (user_catalog_table);
\d+ replication_metadata
Table "public.replication_metadata"
Column | Type | Modifiers | Storage | Stats target | Description
----------+---------+-------------------------------------------------------------------+----------+--------------+-------------
id | integer | not null default nextval('replication_metadata_id_seq'::regclass) | plain | |
relation | name | not null | plain | |
options | text[] | | extended | |
Table "public.replication_metadata"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
----------+---------+-----------+----------+--------------------------------------------------+----------+--------------+-------------
id | integer | | not null | nextval('replication_metadata_id_seq'::regclass) | plain | |
relation | name | | not null | | plain | |
options | text[] | | | | extended | |
Indexes:
"replication_metadata_pkey" PRIMARY KEY, btree (id)
@ -443,12 +443,12 @@ INSERT INTO replication_metadata(relation, options)
VALUES ('bar', ARRAY['a', 'b']);
ALTER TABLE replication_metadata SET (user_catalog_table = true);
\d+ replication_metadata
Table "public.replication_metadata"
Column | Type | Modifiers | Storage | Stats target | Description
----------+---------+-------------------------------------------------------------------+----------+--------------+-------------
id | integer | not null default nextval('replication_metadata_id_seq'::regclass) | plain | |
relation | name | not null | plain | |
options | text[] | | extended | |
Table "public.replication_metadata"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
----------+---------+-----------+----------+--------------------------------------------------+----------+--------------+-------------
id | integer | | not null | nextval('replication_metadata_id_seq'::regclass) | plain | |
relation | name | | not null | | plain | |
options | text[] | | | | extended | |
Indexes:
"replication_metadata_pkey" PRIMARY KEY, btree (id)
Options: user_catalog_table=true
@ -461,13 +461,13 @@ ALTER TABLE replication_metadata ALTER COLUMN rewritemeornot TYPE text;
ERROR: cannot rewrite table "replication_metadata" used as a catalog table
ALTER TABLE replication_metadata SET (user_catalog_table = false);
\d+ replication_metadata
Table "public.replication_metadata"
Column | Type | Modifiers | Storage | Stats target | Description
----------------+---------+-------------------------------------------------------------------+----------+--------------+-------------
id | integer | not null default nextval('replication_metadata_id_seq'::regclass) | plain | |
relation | name | not null | plain | |
options | text[] | | extended | |
rewritemeornot | integer | | plain | |
Table "public.replication_metadata"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
----------------+---------+-----------+----------+--------------------------------------------------+----------+--------------+-------------
id | integer | | not null | nextval('replication_metadata_id_seq'::regclass) | plain | |
relation | name | | not null | | plain | |
options | text[] | | | | extended | |
rewritemeornot | integer | | | | plain | |
Indexes:
"replication_metadata_pkey" PRIMARY KEY, btree (id)
Options: user_catalog_table=false