Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita0f357e

Browse files
committed
psql: Split up "Modifiers" column in \d and \dD
Make separate columns "Collation", "Nullable", "Default".Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com>
1 parent1d15d0d commita0f357e

28 files changed

+1144
-1176
lines changed

‎contrib/earthdistance/expected/earthdistance.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,10 +1049,10 @@ HINT: Use DROP ... CASCADE to drop the dependent objects too.
10491049
drop extension cube cascade;
10501050
NOTICE: drop cascades to table foo column f1
10511051
\d foo
1052-
Table "public.foo"
1053-
Column | Type |Modifiers
1054-
--------+---------+-----------
1055-
f2 | integer |
1052+
Table "public.foo"
1053+
Column | Type |Collation | Nullable | Default
1054+
--------+---------+-----------+----------+---------
1055+
f2 | integer | | |
10561056

10571057
-- list what's installed
10581058
\dT public.*

‎contrib/postgres_fdw/expected/postgres_fdw.out

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -6707,43 +6707,43 @@ IMPORT FOREIGN SCHEMA import_source FROM SERVER loopback INTO import_dest1;
67076707
(5 rows)
67086708

67096709
\d import_dest1.*
6710-
Foreign table "import_dest1.t1"
6711-
Column | Type |Modifiers | FDW Options
6712-
--------+-------------------+-----------+--------------------
6713-
c1 | integer | | (column_name 'c1')
6714-
c2 | character varying | not null | (column_name 'c2')
6710+
Foreign table "import_dest1.t1"
6711+
Column | Type |Collation | Nullable | Default | FDW Options
6712+
--------+-------------------+-----------+----------+---------+--------------------
6713+
c1 | integer | | | |(column_name 'c1')
6714+
c2 | character varying | |not null | | (column_name 'c2')
67156715
Server: loopback
67166716
FDW Options: (schema_name 'import_source', table_name 't1')
67176717

6718-
Foreign table "import_dest1.t2"
6719-
Column | Type | Modifiers | FDW Options
6720-
--------+-------------------+---------------+--------------------
6721-
c1 | integer | | (column_name 'c1')
6722-
c2 | character varying | | (column_name 'c2')
6723-
c3 | text |collatePOSIX | (column_name 'c3')
6718+
Foreign table "import_dest1.t2"
6719+
Column | Type |Collation | Nullable | Default | FDW Options
6720+
--------+-------------------+-----------+----------+---------+--------------------
6721+
c1 | integer || | | (column_name 'c1')
6722+
c2 | character varying || | | (column_name 'c2')
6723+
c3 | text | POSIX | | | (column_name 'c3')
67246724
Server: loopback
67256725
FDW Options: (schema_name 'import_source', table_name 't2')
67266726

6727-
Foreign table "import_dest1.t3"
6728-
Column | Type |Modifiers | FDW Options
6729-
--------+--------------------------+-----------+--------------------
6730-
c1 | timestamp with time zone | | (column_name 'c1')
6731-
c2 | typ1 | | (column_name 'c2')
6727+
Foreign table "import_dest1.t3"
6728+
Column | Type |Collation | Nullable | Default | FDW Options
6729+
--------+--------------------------+-----------+----------+---------+--------------------
6730+
c1 | timestamp with time zone | | | |(column_name 'c1')
6731+
c2 | typ1 | | | |(column_name 'c2')
67326732
Server: loopback
67336733
FDW Options: (schema_name 'import_source', table_name 't3')
67346734

6735-
Foreign table "import_dest1.x 4"
6736-
Column | Type |Modifiers | FDW Options
6737-
--------+-----------------------+-----------+---------------------
6738-
c1 | double precision | | (column_name 'c1')
6739-
C 2 | text | | (column_name 'C 2')
6740-
c3 | character varying(42) | | (column_name 'c3')
6735+
Foreign table "import_dest1.x 4"
6736+
Column | Type |Collation | Nullable | Default | FDW Options
6737+
--------+-----------------------+-----------+----------+---------+---------------------
6738+
c1 | double precision | | | |(column_name 'c1')
6739+
C 2 | text | | | |(column_name 'C 2')
6740+
c3 | character varying(42) | | | |(column_name 'c3')
67416741
Server: loopback
67426742
FDW Options: (schema_name 'import_source', table_name 'x 4')
67436743

6744-
Foreign table "import_dest1.x 5"
6745-
Column | Type |Modifiers | FDW Options
6746-
--------+------+-----------+-------------
6744+
Foreign table "import_dest1.x 5"
6745+
Column | Type |Collation | Nullable | Default | FDW Options
6746+
--------+------+-----------+----------+---------+-------------
67476747
Server: loopback
67486748
FDW Options: (schema_name 'import_source', table_name 'x 5')
67496749

@@ -6763,43 +6763,43 @@ IMPORT FOREIGN SCHEMA import_source FROM SERVER loopback INTO import_dest2
67636763
(5 rows)
67646764

67656765
\d import_dest2.*
6766-
Foreign table "import_dest2.t1"
6767-
Column | Type |Modifiers | FDW Options
6768-
--------+-------------------+-----------+--------------------
6769-
c1 | integer | | (column_name 'c1')
6770-
c2 | character varying | not null | (column_name 'c2')
6766+
Foreign table "import_dest2.t1"
6767+
Column | Type |Collation | Nullable | Default | FDW Options
6768+
--------+-------------------+-----------+----------+---------+--------------------
6769+
c1 | integer | | | |(column_name 'c1')
6770+
c2 | character varying | |not null | | (column_name 'c2')
67716771
Server: loopback
67726772
FDW Options: (schema_name 'import_source', table_name 't1')
67736773

6774-
Foreign table "import_dest2.t2"
6775-
Column | Type | Modifiers | FDW Options
6776-
--------+-------------------+---------------+--------------------
6777-
c1 | integer |default 42 | (column_name 'c1')
6778-
c2 | character varying | | (column_name 'c2')
6779-
c3 | text |collatePOSIX | (column_name 'c3')
6774+
Foreign table "import_dest2.t2"
6775+
Column | Type |Collation | Nullable | Default | FDW Options
6776+
--------+-------------------+-----------+----------+---------+--------------------
6777+
c1 | integer | | | 42 | (column_name 'c1')
6778+
c2 | character varying || | | (column_name 'c2')
6779+
c3 | text | POSIX | | | (column_name 'c3')
67806780
Server: loopback
67816781
FDW Options: (schema_name 'import_source', table_name 't2')
67826782

6783-
Foreign table "import_dest2.t3"
6784-
Column | Type | Modifiers | FDW Options
6785-
--------+--------------------------+---------------+--------------------
6786-
c1 | timestamp with time zone |defaultnow() | (column_name 'c1')
6787-
c2 | typ1 | | (column_name 'c2')
6783+
Foreign table "import_dest2.t3"
6784+
Column | Type |Collation | Nullable | Default | FDW Options
6785+
--------+--------------------------+-----------+----------+---------+--------------------
6786+
c1 | timestamp with time zone | | |now() | (column_name 'c1')
6787+
c2 | typ1 || | | (column_name 'c2')
67886788
Server: loopback
67896789
FDW Options: (schema_name 'import_source', table_name 't3')
67906790

6791-
Foreign table "import_dest2.x 4"
6792-
Column | Type |Modifiers | FDW Options
6793-
--------+-----------------------+-----------+---------------------
6794-
c1 | double precision | | (column_name 'c1')
6795-
C 2 | text | | (column_name 'C 2')
6796-
c3 | character varying(42) | | (column_name 'c3')
6791+
Foreign table "import_dest2.x 4"
6792+
Column | Type |Collation | Nullable | Default | FDW Options
6793+
--------+-----------------------+-----------+----------+---------+---------------------
6794+
c1 | double precision | | | |(column_name 'c1')
6795+
C 2 | text | | | |(column_name 'C 2')
6796+
c3 | character varying(42) | | | |(column_name 'c3')
67976797
Server: loopback
67986798
FDW Options: (schema_name 'import_source', table_name 'x 4')
67996799

6800-
Foreign table "import_dest2.x 5"
6801-
Column | Type |Modifiers | FDW Options
6802-
--------+------+-----------+-------------
6800+
Foreign table "import_dest2.x 5"
6801+
Column | Type |Collation | Nullable | Default | FDW Options
6802+
--------+------+-----------+----------+---------+-------------
68036803
Server: loopback
68046804
FDW Options: (schema_name 'import_source', table_name 'x 5')
68056805

@@ -6818,43 +6818,43 @@ IMPORT FOREIGN SCHEMA import_source FROM SERVER loopback INTO import_dest3
68186818
(5 rows)
68196819

68206820
\d import_dest3.*
6821-
Foreign table "import_dest3.t1"
6822-
Column | Type |Modifiers | FDW Options
6823-
--------+-------------------+-----------+--------------------
6824-
c1 | integer | | (column_name 'c1')
6825-
c2 | character varying | | (column_name 'c2')
6821+
Foreign table "import_dest3.t1"
6822+
Column | Type |Collation | Nullable | Default | FDW Options
6823+
--------+-------------------+-----------+----------+---------+--------------------
6824+
c1 | integer | | | |(column_name 'c1')
6825+
c2 | character varying | | | |(column_name 'c2')
68266826
Server: loopback
68276827
FDW Options: (schema_name 'import_source', table_name 't1')
68286828

6829-
Foreign table "import_dest3.t2"
6830-
Column | Type |Modifiers | FDW Options
6831-
--------+-------------------+-----------+--------------------
6832-
c1 | integer | | (column_name 'c1')
6833-
c2 | character varying | | (column_name 'c2')
6834-
c3 | text | | (column_name 'c3')
6829+
Foreign table "import_dest3.t2"
6830+
Column | Type |Collation | Nullable | Default | FDW Options
6831+
--------+-------------------+-----------+----------+---------+--------------------
6832+
c1 | integer | | | |(column_name 'c1')
6833+
c2 | character varying | | | |(column_name 'c2')
6834+
c3 | text | | | |(column_name 'c3')
68356835
Server: loopback
68366836
FDW Options: (schema_name 'import_source', table_name 't2')
68376837

6838-
Foreign table "import_dest3.t3"
6839-
Column | Type |Modifiers | FDW Options
6840-
--------+--------------------------+-----------+--------------------
6841-
c1 | timestamp with time zone | | (column_name 'c1')
6842-
c2 | typ1 | | (column_name 'c2')
6838+
Foreign table "import_dest3.t3"
6839+
Column | Type |Collation | Nullable | Default | FDW Options
6840+
--------+--------------------------+-----------+----------+---------+--------------------
6841+
c1 | timestamp with time zone | | | |(column_name 'c1')
6842+
c2 | typ1 | | | |(column_name 'c2')
68436843
Server: loopback
68446844
FDW Options: (schema_name 'import_source', table_name 't3')
68456845

6846-
Foreign table "import_dest3.x 4"
6847-
Column | Type |Modifiers | FDW Options
6848-
--------+-----------------------+-----------+---------------------
6849-
c1 | double precision | | (column_name 'c1')
6850-
C 2 | text | | (column_name 'C 2')
6851-
c3 | character varying(42) | | (column_name 'c3')
6846+
Foreign table "import_dest3.x 4"
6847+
Column | Type |Collation | Nullable | Default | FDW Options
6848+
--------+-----------------------+-----------+----------+---------+---------------------
6849+
c1 | double precision | | | |(column_name 'c1')
6850+
C 2 | text | | | |(column_name 'C 2')
6851+
c3 | character varying(42) | | | |(column_name 'c3')
68526852
Server: loopback
68536853
FDW Options: (schema_name 'import_source', table_name 'x 4')
68546854

6855-
Foreign table "import_dest3.x 5"
6856-
Column | Type |Modifiers | FDW Options
6857-
--------+------+-----------+-------------
6855+
Foreign table "import_dest3.x 5"
6856+
Column | Type |Collation | Nullable | Default | FDW Options
6857+
--------+------+-----------+----------+---------+-------------
68586858
Server: loopback
68596859
FDW Options: (schema_name 'import_source', table_name 'x 5')
68606860

‎contrib/test_decoding/expected/ddl.out

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,12 @@ CREATE TABLE replication_metadata (
416416
WITH (user_catalog_table = true)
417417
;
418418
\d+ replication_metadata
419-
Table "public.replication_metadata"
420-
Column | Type | Modifiers | Storage | Stats target | Description
421-
----------+---------+-------------------------------------------------------------------+----------+--------------+-------------
422-
id | integer | not nulldefault nextval('replication_metadata_id_seq'::regclass) | plain | |
423-
relation | name |not null | plain | |
424-
options | text[] | | extended | |
419+
Table "public.replication_metadata"
420+
Column | Type |Collation | Nullable |Default | Storage | Stats target | Description
421+
----------+---------+-----------+----------+--------------------------------------------------+----------+--------------+-------------
422+
id | integer | |not null| nextval('replication_metadata_id_seq'::regclass) | plain | |
423+
relation | name | | not null | | plain | |
424+
options | text[] || | | extended | |
425425
Indexes:
426426
"replication_metadata_pkey" PRIMARY KEY, btree (id)
427427
Options: user_catalog_table=true
@@ -430,25 +430,25 @@ INSERT INTO replication_metadata(relation, options)
430430
VALUES ('foo', ARRAY['a', 'b']);
431431
ALTER TABLE replication_metadata RESET (user_catalog_table);
432432
\d+ replication_metadata
433-
Table "public.replication_metadata"
434-
Column | Type | Modifiers | Storage | Stats target | Description
435-
----------+---------+-------------------------------------------------------------------+----------+--------------+-------------
436-
id | integer | not nulldefault nextval('replication_metadata_id_seq'::regclass) | plain | |
437-
relation | name |not null | plain | |
438-
options | text[] | | extended | |
433+
Table "public.replication_metadata"
434+
Column | Type |Collation | Nullable |Default | Storage | Stats target | Description
435+
----------+---------+-----------+----------+--------------------------------------------------+----------+--------------+-------------
436+
id | integer | |not null| nextval('replication_metadata_id_seq'::regclass) | plain | |
437+
relation | name | | not null | | plain | |
438+
options | text[] || | | extended | |
439439
Indexes:
440440
"replication_metadata_pkey" PRIMARY KEY, btree (id)
441441

442442
INSERT INTO replication_metadata(relation, options)
443443
VALUES ('bar', ARRAY['a', 'b']);
444444
ALTER TABLE replication_metadata SET (user_catalog_table = true);
445445
\d+ replication_metadata
446-
Table "public.replication_metadata"
447-
Column | Type | Modifiers | Storage | Stats target | Description
448-
----------+---------+-------------------------------------------------------------------+----------+--------------+-------------
449-
id | integer | not nulldefault nextval('replication_metadata_id_seq'::regclass) | plain | |
450-
relation | name |not null | plain | |
451-
options | text[] | | extended | |
446+
Table "public.replication_metadata"
447+
Column | Type |Collation | Nullable |Default | Storage | Stats target | Description
448+
----------+---------+-----------+----------+--------------------------------------------------+----------+--------------+-------------
449+
id | integer | |not null| nextval('replication_metadata_id_seq'::regclass) | plain | |
450+
relation | name | | not null | | plain | |
451+
options | text[] || | | extended | |
452452
Indexes:
453453
"replication_metadata_pkey" PRIMARY KEY, btree (id)
454454
Options: user_catalog_table=true
@@ -461,13 +461,13 @@ ALTER TABLE replication_metadata ALTER COLUMN rewritemeornot TYPE text;
461461
ERROR: cannot rewrite table "replication_metadata" used as a catalog table
462462
ALTER TABLE replication_metadata SET (user_catalog_table = false);
463463
\d+ replication_metadata
464-
Table "public.replication_metadata"
465-
Column | Type | Modifiers | Storage | Stats target | Description
466-
----------------+---------+-------------------------------------------------------------------+----------+--------------+-------------
467-
id | integer | not nulldefault nextval('replication_metadata_id_seq'::regclass) | plain | |
468-
relation | name |not null | plain | |
469-
options | text[] | | extended | |
470-
rewritemeornot | integer | | plain | |
464+
Table "public.replication_metadata"
465+
Column | Type |Collation | Nullable |Default | Storage | Stats target | Description
466+
----------------+---------+-----------+----------+--------------------------------------------------+----------+--------------+-------------
467+
id | integer | |not null| nextval('replication_metadata_id_seq'::regclass) | plain | |
468+
relation | name | | not null | | plain | |
469+
options | text[] || | | extended | |
470+
rewritemeornot | integer || | | plain | |
471471
Indexes:
472472
"replication_metadata_pkey" PRIMARY KEY, btree (id)
473473
Options: user_catalog_table=false

‎doc/src/sgml/ref/create_index.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,9 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
459459
<programlisting>
460460
postgres=# \d tab
461461
Table "public.tab"
462-
Column | Type |Modifiers
463-
--------+---------+-----------
464-
col | integer |
462+
Column | Type |Collation | Nullable | Default
463+
--------+---------+-----------+----------+---------
464+
col | integer | | |
465465
Indexes:
466466
"idx" btree (col) INVALID
467467
</programlisting>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp