Re: Adding support for Default partition in partitioning
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
From: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Rahila Syed <rahilasyed90@gmail.com>, Keith Fiske <keith@omniti.com>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>,
Rushabh Lathia <rushabh.lathia@gmail.com>, David Steele <david@pgmasters.net>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-04-24T12:14:57Z
Lists: pgsql-hackers
On Mon, Apr 24, 2017 at 4:24 PM, Robert Haas <robertmhaas@gmail.com> wrote: > On Mon, Apr 24, 2017 at 5:10 AM, Rahila Syed <rahilasyed90@gmail.com> wrote: >> Following can also be considered as it specifies more clearly that the >> partition holds default values. >> >> CREATE TABLE ...PARTITION OF...FOR VALUES DEFAULT; > > Yes, that could be done. But I don't think it's correct to say that > the partition holds default values. Let's back up and ask what the > word "default" means. The relevant definition (according to Google or > whoever they stole it from) is: > > a preselected option adopted by a computer program or other mechanism > when no alternative is specified by the user or programmer. > > So, a default *value* is the value that is used when no alternative is > specified by the user or programmer. We have that concept, but it's > not what we're talking about here: that's configured by applying the > DEFAULT property to a column. Here, we're talking about the default > *partition*, or in other words the *partition* that is used when no > alternative is specified by the user or programmer. So, that's why I > proposed the syntax I did. The partition doesn't contain default > values; it is itself a default. Is CREATE TABLE ... DEFAULT PARTITION OF ... feasible? That sounds more natural. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company
Commits
-
Allow a partitioned table to have a default partition.
- 6f6b99d1335b 11.0 landed
-
Adjust min/max values when changing sequence type
- 60a0b2ec8943 10.0 cited
-
BRIN auto-summarization
- 7526e10224f0 10.0 cited