Re: [PATCH] Automatic HASH and LIST partition creation

Поиск
Список
Период
Сортировка
От Pavel Borisov
Тема Re: [PATCH] Automatic HASH and LIST partition creation
Дата
Msg-id CALT9ZEFe4Fj4mEnbpVmHQEXRC_K-DoicYvV-xHi0JZ3JTkc3Wg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Automatic HASH and LIST partition creation  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [PATCH] Automatic HASH and LIST partition creation  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
> CREATE TABLE foo(a int) PARTITION BY LIST(a) CONFIGURATION (FOR VALUES IN
> (1,2),(3,4) DEFAULT PARTITION foo_def);

I would like to disagree with this syntactic approach because it would
very specific to each partition method. IMHO the syntax should be as
generic as possible. I'd suggest (probably again) a keyword/value list
which would allow to be quite adaptable without inducing any pressure on
the parser.
If I remember your proposal correctly it is something like
CREATE TABLE foo(...) PARTITION BY HASH AUTOMATIC (MODULUS 10);

It is still possible but there are some caveats:
1. We'll need to add keyword MODULUS (and probably AUTOMATIC) to the parser's list. I don't against this but as far as I've heard there is some opposition among PG community against new keywords. Maybe I am wrong.
2. The existing syntax for declarative partitioning is different to your proposal. It is still not a big problem and your proposal makes query shorter for several words. I'd just like to see some consensus on the syntax. Now I must admit there are too many contradictions in opinions which make progress slow. Also I think it is important to have a really convenient syntaх.
2a Maybe we all who participated in the thread can vote for some variant?
2b Maybe the existing syntax for declarative partitioniong should be given some priority as it is already committed into CREATE TABLE ... PARTITION OF ... FOR VALUES IN.. etc.

I'd be happy if everyone will join some version of the proposed syntaх in this thread and in the previous discussion [1]. If we have a variant with more than one supporter, sure we can develop patch based on it.
Thank you very much
and Merry Christmas!


-- 
Best regards,
Pavel Borisov

Postgres Professional: http://postgrespro.com

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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Deadlock between backend and recovery may not be detected
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Confused about stream replication protocol documentation