public inbox for [email protected]
help / color / mirror / Atom feedFrom: Fabien COELHO <[email protected]>
To: Pavel Borisov <[email protected]>
Cc: Maxim Orlov <[email protected]>
Cc: Anastasia Lubennikova <[email protected]>
Cc: Rahila Syed <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Justin Pryzby <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Amul Sul <[email protected]>
Subject: Re: [PATCH] Automatic HASH and LIST partition creation
Date: Tue, 22 Dec 2020 11:38:30 -0400 (AST)
Message-ID: <alpine.DEB.2.22.394.2012221131410.533489@pseudo> (raw)
In-Reply-To: <CALT9ZEFe4Fj4mEnbpVmHQEXRC_K-DoicYvV-xHi0JZ3JTkc3Wg@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CALT9ZEECZacCRuSthkq5ivOysL5E--v6vr9=0CFouSjEKpbOow@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAH2L28v_fmXvDF+UzMDCObgd7nuqSU=HAJPfw7w4TMx5HGv5ig@mail.gmail.com>
<[email protected]>
<CAH2L28vRKPw+uf3Voiy6zy5QUghTPueErNTz_xgpkxEKnmfL1A@mail.gmail.com>
<[email protected]>
<CALT9ZEFBv05OhLMKO1Lbo_Zg9a0v+U9q9twe=t-dixfR45RmVQ@mail.gmail.com>
<CALT9ZEHL0zgOfvx9ZrH0H4FiuVOKCRU6LcjGxB+1KRPLpAq9+w@mail.gmail.com>
<CALT9ZEHLvWsvfOpGLy8edEVGj-GYbkp03K676njhibatkqJmHA@mail.gmail.com>
<[email protected]>
<alpine.DEB.2.22.394.2012221025000.533489@pseudo>
<CALT9ZEFe4Fj4mEnbpVmHQEXRC_K-DoicYvV-xHi0JZ3JTkc3Wg@mail.gmail.com>
HEllo.
>>> 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);
Yep, that would be the spirit.
> 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.
Why? We could accept anything in the list? i.e.:
(ident =? value[, ident =? value]*)
> 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.
the ident is a keyword that can be interpreted later on, not a "reserved
keyword" from a parser perspective, which is the only real issue?
The parser does not need to know about it, only the command interpreter
which will have to interpret it. AUTOMATIC is a nice parser cue to
introduce such a ident-value list.
> 2. The existing syntax for declarative partitioning is different to your
> proposal.
Yep. I think that it was not so good a design choice from a
language/extensibility perspective.
> 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!
>
> [1]
> https://www.postgresql.org/message-id/flat/alpine.DEB.2.21.1907150711080.22273%40lancre
>
>
--
Fabien.
view thread (38+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: [PATCH] Automatic HASH and LIST partition creation
In-Reply-To: <alpine.DEB.2.22.394.2012221131410.533489@pseudo>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox