Re: [HACKERS] Partitions: \d vs \d+ - Mailing list pgsql-hackers

From Maksim Milyutin
Subject Re: [HACKERS] Partitions: \d vs \d+
Date
Msg-id 208edf20-c8b2-7d2e-cece-f0115335114d@gmail.com
Whole thread Raw
In response to [HACKERS] Partitions: \d vs \d+  (Jesper Pedersen <jesper.pedersen@redhat.com>)
Responses Re: [HACKERS] Partitions: \d vs \d+  (Jesper Pedersen <jesper.pedersen@redhat.com>)
Re: [HACKERS] Partitions: \d vs \d+  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers

Hi!

On 28.09.2017 16:02, Jesper Pedersen wrote:
Hi,

Using hash partitions I noticed that \d gives

D=# \d T_p63
               Table "public.T_p63"
    Column     |     Type      | Collation | Nullable | Default
---------------+---------------+-----------+----------+---------

<remove>

Partition of: T FOR VALUES WITH (modulus 64, remainder 63)
No partition constraint
Indexes:
    "T_p63" btree (X, Y)

where as \d+ gives

D=# \d+ T_p63
               Table "public.T_p63"
    Column     |     Type      | Collation | Nullable | Default | Storage  | Stats target | Description
---------------+---------------+-----------+----------+---------+----------+--------------+-------------

<remove>

Partition of: T FOR VALUES WITH (modulus 64, remainder 63)
Partition constraint: satisfies_hash_partition(64, 63, hashint4extended(X, '8816678312871386367'::bigint))
Indexes:
    "T_p63" btree (X, Y)

E.g. "No partition constraint" vs. "Partition constraint: satisfies_hash_partition(...)".

I also noticed ambiguity in printing "No partition constraint" in non-verbose mode and "Partition constraint:..." in verbose one for partition tables regardless of the type of partition.
Attached small patch removes any output about partition constraint in non-verbose mode.
-- 
Regards,
Maksim Milyutin
Attachment

pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: [HACKERS] Partitions: \d vs \d+
Next
From: Jesper Pedersen
Date:
Subject: Re: [HACKERS] Partitions: \d vs \d+