From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b |
Date: | 2017-09-13 14:54:48 |
Message-ID: | CAEZATCVbRDFHi_gA58698TEG_jK5G463wKsGr=yEpj4XWztFXQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 13 September 2017 at 14:53, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Sep 13, 2017 at 4:51 AM, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
>> A drawback to doing this is that we lose compatibility with syntaxes
>> supported by other databases, which was part of the reason for
>> choosing the terms MINVALUE and MAXVALUE in the first place.
>>
>> So thinking about this afresh, my preference would actually be to just
>> canonicalise the values stored rather than erroring out.
>
> Can you be more specific about what other databases do here? Which
> other systems support MINVALUE/MAXVALUE, and what are their respective
> behaviors in this situation?
>
Oracle, MySQL and DB2 all use MINVALUE/MAXVALUE. Actually, Oracle and
MySQL only use MAXVALUE, not MINVALUE, because they don't allow gaps
between partitions and the first partition implicitly starts at
MINVALUE, so the bounds that we currently support are a strict
superset of those supported by Oracle and MySQL.
Both Oracle and MySQL allow finite values after MAXVALUE (usually
listed as "0" in code examples, e.g. see [1]). Oracle explicitly
documents the fact that values after MAXVALUE are irrelevant in [1].
I'm not sure if MySQL explicitly documents that, but it does behave
the same.
Also, both Oracle and MySQL store what the user entered (they do not
canonicalise), as can be seen by looking at ALL_TAB_PARTITIONS in
Oracle, or "show create table" in MySQL.
I have not used DB2.
Regards,
Dean
[1] https://docs.oracle.com/cd/E18283_01/server.112/e16541/part_admin001.htm
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-09-13 15:12:57 | pgsql: Distinguish selectivity of < from <= and > from >=. |
Previous Message | Peter Eisentraut | 2017-09-13 14:13:37 | pgsql: doc: Remove incorrect SCRAM protocol documentation |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2017-09-13 15:04:41 | Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction |
Previous Message | Alvaro Herrera | 2017-09-13 14:51:17 | Re: psql: new help related to variables are not too readable |