Re: [HACKERS] Partitions: \d vs \d+

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: [HACKERS] Partitions: \d vs \d+
Дата
Msg-id d52d96a7-92f6-2538-74a3-08f375f497d5@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] Partitions: \d vs \d+  (Jesper Pedersen <jesper.pedersen@redhat.com>)
Список pgsql-hackers
On 2017/09/28 22:29, Jesper Pedersen wrote:
> On 09/28/2017 09:19 AM, Maksim Milyutin wrote:
>>> 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.
>>
> 
> Yeah, that could be one way.
> 
> It should likely be backported to REL_10_STABLE, so the question is if we
> are too late in the release cycle to change that output.

I think the default partition commit [1] introduced some change around
that code, so the behavior is new in 11dev and I think it needs a fix like
the one that Maksim proposed.

When I check with REL_10_STABLE tip, I find things to be normal:

create table p (a int) partition by list (a);
create table p1 partition of p for values in (1);

\d p1                Table "public.p1"Column |  Type   | Collation | Nullable | Default
--------+---------+-----------+----------+---------a      | integer |           |          |
Partition of: p FOR VALUES IN (1)

\d+ p1                                   Table "public.p1"Column |  Type   | Collation | Nullable | Default | Storage |
Stats
target | Description
--------+---------+-----------+----------+---------+---------+--------------+-------------a      | integer |
|         |         | plain   |              |
 
Partition of: p FOR VALUES IN (1)
Partition constraint: ((a IS NOT NULL) AND (a = ANY (ARRAY[1])))

Thanks,
Amit

[1]

https://git.postgresql.org/gitweb/?p=postgresql.git;a=blobdiff;f=src/bin/psql/describe.c;h=d22ec68431e231d9c781c2256a6030d66e0fd09d;hp=6fb9bdd063583fb8b60ad282aeb5256df67942e4;hb=6f6b99d1335be8ea1b74581fc489a97b109dd08a;hpb=2cf15ec8b1cb29bea149559700566a21a790b6d3



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] [Proposal] Allow users to specify multiple tables inVACUUM commands
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] Partitions: \d vs \d+