Re: New partitioning - some feedback

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
Cc: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>, Michael Banck <michael(dot)banck(at)credativ(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New partitioning - some feedback
Date: 2017-07-11 01:47:17
Message-ID: 386d3093-db9e-46f2-672d-e58114433dd1@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017/07/11 10:34, Paul A Jungwirth wrote:
>> Also, there seems to be at least some preference
>> for excluding partitions by default from the \d listing.
>
> As another user of partitions I'll chime in and say that would be very
> nice! On the other hand, with pre-10 partitions you do see all the
> child tables with `\d`, so showing declarative partitions seems more
> consistent with the old functionality.

That's one way of looking at it. :)

> On the third hand with pre-10 partitions I can put the child tables
> into a separate schema to de-clutter `\d`, but I don't see any way to
> do that with declarative partitions. Since there is no workaround it
> makes it a bit more important for partitions not to be so noisy.

You can do that with declarative partitions:

create table foo (a int) partition by list (a);

create schema foo_parts;
create table foo_parts.foo1 partition of foo for values in (1);
create table foo_parts.foo2 partition of foo for values in (2);

\d
List of relations
Schema | Name | Type | Owner
--------+------+-------+-------
public | foo | table | amit
(1 row)

set search_path to foo_parts;

\d
List of relations
Schema | Name | Type | Owner
-----------+------+-------+-------
foo_parts | foo1 | table | amit
foo_parts | foo2 | table | amit
(2 rows)

Thanks,
Amit

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-07-11 02:12:38 Re: pgsql 10: hash indexes testing
Previous Message Peter Geoghegan 2017-07-11 01:44:01 Re: strcmp() tie-breaker for identical ICU-collated strings