On Fri, Mar 17, 2017 at 7:57 AM, Yugo Nagata <nag...@sraoss.co.jp> wrote: > I also understanded that my design has a problem during pg_dump and > pg_upgrade, and that some information to identify the partition > is required not depending the command order. However, I feel that > Amul's design is a bit complicated with the rule to specify modulus. > > I think we can use simpler syntax, for example, as below. > > CREATE TABLE h1 PARTITION OF h FOR (0); > CREATE TABLE h2 PARTITION OF h FOR (1); > CREATE TABLE h3 PARTITION OF h FOR (2);
I don't see how that can possibly work. Until you see all the table partitions, you don't know what the partitioning constraint for any given partition should be, which seems to me to be a fatal problem. I agree that Amul's syntax - really, I proposed it to him - is not the simplest, but I think all the details needed to reconstruct the partitioning constraint need to be explicit. Otherwise, I'm pretty sure things we're going to have lots of problems that we can't really solve cleanly. We can later invent convenience syntax that makes common configurations easier to set up, but we should invent the syntax that spells out all the details first. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers