Re: [ psql - review request ] review request for \d+ tablename, \d+ indexname indenting

Поиск
Список
Период
Сортировка
От 쿼리트릭스
Тема Re: [ psql - review request ] review request for \d+ tablename, \d+ indexname indenting
Дата
Msg-id CAO5pyYM0ArTEuoAOHr13UMgNYocur91427M9Ms7ZPSnV=Jb1Yw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [ psql - review request ] review request for \d+ tablename, \d+ indexname indenting  (Cary Huang <cary.huang@highgo.ca>)
Ответы Re: [ psql - review request ] review request for \d+ tablename, \d+ indexname indenting  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-hackers
Thank you for letting me know more about the test method.
As you said, we applied the patch using git diff and created a test case on the src/test/regress/sql.
Considering your question, we think it is enough to assume just one subpartition level.
Because, Concidering the common partition configuration methods, we think it is  rare case to configure subpartitions contains subpartitions.
So, we think it would be appropriate to mark up to level 1 of the subpartition when using \d+.
If there subpartitions contains subpartitions, the keyword 'CONTAINS SUBPARTITIONS' is added next to the partition name to indicate that the subpartitions contains subpartitions exists.
These sources were tested on 14.5, 15.2 and 16 RC versions, respectively.
If you have any other opinions on this, please let us know. we will actively consider it.

Team Query Tricks 
---------------------------------------



2023년 8월 26일 (토) 오전 6:01, Cary Huang <cary.huang@highgo.ca>님이 작성:
The following review has been posted through the commitfest application:
make installcheck-world:  tested, failed
Implements feature:       not tested
Spec compliant:           not tested
Documentation:            not tested

Hello

Thank you for the patch and the effort to enhance \d+ 's output on partitioned tables that contain sub-partitions. However, the patch does not apply and I notice that this patch is generated as a differ file from 2 files, describe.c and describe_change.c. You should use git diff to generate a patch rather than maintaining 2 files yourself. Also I noticed that you include a "create_object.sql" file to illustrate the feature, which is not necessary. Instead, you should add them as a regression test cases in the existing regression test suite under "src/test/regress", so these will get run as tests to illustrate the feature. This patch changes the output of \d+ and it could potentially break other test cases so you should fix them in the patch in addition to providing the feature

Now, regarding the feature, I see that you intent to print the sub partitions' partitions in the output, which is okay in my opinion. However, a sub-partition can also contain another sub-partition, which contains another sub-partition and so on. So it is possible that sub-partitions can span very, very deep. Your example assumes only 1 level of sub-partitions. Are you going to print all of them out in \d+? If so, it would definitely cluster the output so much that it starts to become annoying. Are you planning to set a limit on how many levels of sub-partitions to print or just let it print as many as it needs?

thank you

Cary Huang
-----------------------
Highgo Software Canada
www.highgo.ca
Вложения

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

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: [PoC] pg_upgrade: allow to upgrade publisher node
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Adding a pg_get_owned_sequence function?