Re: [HACKERS] Adding support for Default partition in partitioning

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Adding support for Default partition in partitioning
Дата
Msg-id CA+TgmoZfFTsLEEmkqxQN4o+A3hhuLUj32usRB+xWdN7LPJ0U+Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Adding support for Default partition in partitioning  (Rahila Syed <rahilasyed90@gmail.com>)
Ответы Re: [HACKERS] Adding support for Default partition in partitioning
Список pgsql-hackers
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.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] Declarative partitioning - another take
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [HACKERS] some review comments on logical rep code