Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b
Date: 2017-08-09 12:14:23
Message-ID: CA+TgmoYKc8z25nqLc8G=VB8W-N7Z8kFKR+F5y6y8J0LF+AWEDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, Aug 8, 2017 at 7:33 PM, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> Well perhaps verbosity-reduction isn't sufficient justification but I
> still think this is correct because logically any values in the bound
> after MINVALUE/MAXVALUE are irrelevant, so it seems overly restrictive
> to force all later values to be MINVALUE/MAXVALUE when the code will
> just ignore those values.

I just don't understand why you think there should be multiple
spellings of the same bound. Generally, canonicalization is good.
One of my fears here is that at least some people will get confused
and think a bound from (minvalue, 0) to (maxvalue, 10) allows any
value for the first column and a 0-9 value for the second column which
is wrong.

My other fear is that, since you've not only allowed this into the
syntax but into the catalog, this will become a source of bugs for
years to come. Every future patch that deals with partition bounds
will now have to worry about testing
unbounded-followed-by-non-unbounded. If we're not going to put back
those error checks completely - and I think we should - we should at
least canonicalize what actually gets stored.

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-08-09 14:14:14 Re: Re: [COMMITTERS] pgsql: Fix inadequacies in recently added wait events
Previous Message Thomas Munro 2017-08-09 09:38:51 Re: Re: [COMMITTERS] pgsql: Fix inadequacies in recently added wait events

Browse pgsql-hackers by date

  From Date Subject
Next Message Rajkumar Raghuwanshi 2017-08-09 12:18:48 Re: Default Partition for Range
Previous Message Robert Haas 2017-08-09 12:03:54 Re: dubious error message from partition.c