1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Tie loose ends in psql's new \dP command

* Remove one unnecessary pg_class join in SQL command.  Not needed,
  because we use a regclass cast instead.

* Doc: refer to "partitioned relations" rather than specifically tables,
  since indexes are also displayed.

* Rename "On table" column to "Table", for consistency with \di.

Author: Justin Pryzby
Discussion: https://postgr.es/m/20190407212525.GB10080@telsasoft.com
This commit is contained in:
Alvaro Herrera
2019-04-17 18:35:41 -04:00
parent b036982db7
commit 421a2c4832
3 changed files with 15 additions and 16 deletions

View File

@ -4615,7 +4615,7 @@ create index testpart_orange_index on testpart_orange(logdate);
-- only partition related object should be displayed
\dP test*apple*
List of partitioned relations
Schema | Name | Owner | Type | Parent name | On table
Schema | Name | Owner | Type | Parent name | Table
----------+----------------------+-----------------------+-------------------+-------------+----------------
testpart | testpart_apple | testrole_partitioning | partitioned table | |
testpart | testpart_apple_index | testrole_partitioning | partitioned index | | testpart_apple
@ -4630,7 +4630,7 @@ create index testpart_orange_index on testpart_orange(logdate);
\dPi test*apple*
List of partitioned indexes
Schema | Name | Owner | Parent name | On table
Schema | Name | Owner | Parent name | Table
----------+----------------------+-----------------------+-------------+----------------
testpart | testpart_apple_index | testrole_partitioning | | testpart_apple
(1 row)
@ -4665,14 +4665,14 @@ insert into parent_tab values (generate_series(30,39));
\dPi
List of partitioned indexes
Schema | Name | Owner | On table
Schema | Name | Owner | Table
----------+--------------+-----------------------+------------
testpart | parent_index | testrole_partitioning | parent_tab
(1 row)
\dP testpart.*
List of partitioned relations
Schema | Name | Owner | Type | Parent name | On table
Schema | Name | Owner | Type | Parent name | Table
----------+--------------------+-----------------------+-------------------+--------------+-------------
testpart | parent_tab | testrole_partitioning | partitioned table | |
testpart | child_30_40 | testrole_partitioning | partitioned table | parent_tab |
@ -4682,7 +4682,7 @@ insert into parent_tab values (generate_series(30,39));
\dP
List of partitioned relations
Schema | Name | Owner | Type | On table
Schema | Name | Owner | Type | Table
----------+--------------+-----------------------+-------------------+------------
testpart | parent_tab | testrole_partitioning | partitioned table |
testpart | parent_index | testrole_partitioning | partitioned index | parent_tab
@ -4698,7 +4698,7 @@ insert into parent_tab values (generate_series(30,39));
\dPin
List of partitioned indexes
Schema | Name | Owner | Parent name | On table
Schema | Name | Owner | Parent name | Table
----------+--------------------+-----------------------+--------------+-------------
testpart | parent_index | testrole_partitioning | | parent_tab
testpart | child_30_40_id_idx | testrole_partitioning | parent_index | child_30_40
@ -4706,7 +4706,7 @@ insert into parent_tab values (generate_series(30,39));
\dPn
List of partitioned relations
Schema | Name | Owner | Type | Parent name | On table
Schema | Name | Owner | Type | Parent name | Table
----------+--------------------+-----------------------+-------------------+--------------+-------------
testpart | parent_tab | testrole_partitioning | partitioned table | |
testpart | child_30_40 | testrole_partitioning | partitioned table | parent_tab |
@ -4716,7 +4716,7 @@ insert into parent_tab values (generate_series(30,39));
\dPn testpart.*
List of partitioned relations
Schema | Name | Owner | Type | Parent name | On table
Schema | Name | Owner | Type | Parent name | Table
----------+--------------------+-----------------------+-------------------+--------------+-------------
testpart | parent_tab | testrole_partitioning | partitioned table | |
testpart | child_30_40 | testrole_partitioning | partitioned table | parent_tab |