Re: ToDo: show size of partitioned table
От | Michael Paquier |
---|---|
Тема | Re: ToDo: show size of partitioned table |
Дата | |
Msg-id | 20181120075031.GM4400@paquier.xyz обсуждение исходный текст |
Ответ на | Re: ToDo: show size of partitioned table (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: ToDo: show size of partitioned table
Re: ToDo: show size of partitioned table |
Список | pgsql-hackers |
On Mon, Nov 05, 2018 at 11:43:16AM +0100, Pavel Stehule wrote: > should be fixed now. Here are some notes on the last version. + " FROM pg_inherits i\n" Missing schema qualification. + case 'P': + if (cmd[2] == 'i') + success = listPartitions(pattern, show_verbose, true, false); + else if (cmd[2] == 't') + success = listPartitions(pattern, show_verbose, false, true); + else if (cmd[2] == '+' || cmd[2] == '\0') + success = listPartitions(pattern, show_verbose, false, false); + else + status = PSQL_CMD_UNKNOWN; + break; The style is heavy. Perhaps it would be cleaner to have a switch/case.. Not a big deal visibly. show_indexes is true only if the subcommand is 'i'. show_tables is true only if the subcommand is 't'. Using "\dP" with a pattern matching a partitioned index should show a partitioned index, no? As far as I know, a partitioned relation can be either an index or a table. Testing the feature, \dP shows all partitioned relations, still does not show the relationship when multiple levels are used. Could it make sense to also show the direct parent of a partitioned table when verbose mode is used? Could it be possible to have tests for \dP, \dPi and \dPt with matching patterns? You could just place that in one of the existing tests where there are partitioned tables and indexes. -- Michael
Вложения
В списке pgsql-hackers по дате отправления: