On 2017/07/12 13:09, Amit Langote wrote:
> On 2017/07/12 12:47, Ashutosh Bapat wrote:
>> Do you see that those patches can be used in current discussion in any way?
>
> It wouldn't really be a bad idea to put that patch here, because there's
> no special reason for it to be in the CF for PG 11, if we are talking here
> about changing \d command outputs anyway.
So, here are 4 patches (including the 2 patches that Ashutosh linked to
upthread):
0001: Show relispartition=true relations as "(foreign) partition" and
RELKIND_PARTITIONED_TABLE relations that are not themselves
partitions as "partitioned table"
0002: Hide relispartition=true relations (partitions) by default in the
\d listing (that is, \d without a name pattern); to enable
displaying partitions, add a modifier '++'
0003: In \d+ partitioned_table output (describe partitioned table showing
individual partitions), show if the individual partitions are
partitioned themselves if it actually does have partitions
currently
0004: In \d+ partitioned_table output, do not skip the portion of the
output showing information about partitions if there are currently
no partitions defined; instead show "Number of partitions: 0"
Regarding 0001, while it shows "partition" and "partitioned table" in the
Type column of \d listing, \d name_pattern will still show Table
"schemaname.tablename". For example:
\d
List of relations
Schema | Name | Type | Owner
--------+-------+-------------------+-------
public | xyz | partitioned table | amit
public | xyz1 | partition | amit
public | xyz2 | partition | amit
public | xyz3 | partition | amit
public | xyz31 | partition | amit
(5 rows)
\d xyz*
Table "public.xyz"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
a | integer | | |
Partition key: LIST (a)
Number of partitions: 3 (Use \d+ to list them.)
Table "public.xyz1"
<snip>
Table "public.xyz2"
<snip>
Table "public.xyz3"
<snip>
Table "public.xyz31"
<snip>
...which might seem kind of odd. Do we want to show xyz1 as "Partition
public.xyz1", for example?
Thanks,
Amit
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers