Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Florian Pflug
On Sep21, 2011, at 19:02 , Jeff Davis wrote: On Wed, 2011-09-21 at 13:24 +0200, Florian Pflug wrote: I've thought about this some more, and came to realize that the question here really is whether floatrange(0, 'Infinity'::float, '[)') and floatrange(0, NULL, '[)') are the same

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-19 Thread Pavel Stehule
hello sorry for late assign to discussion. I don't think so using NULL instead INF is a good idea. Regards Pavel Stehule 2011/9/19 Jeff Davis pg...@j-davis.com: On Sun, 2011-09-18 at 18:08 +0200, Erik Rijkers wrote: Below are 2 changes.  The first change is an elog saying 'lower' instead of

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-19 Thread Robert Haas
On Mon, Sep 19, 2011 at 1:51 AM, Jeff Davis pg...@j-davis.com wrote: select '[ 2 , NULL )'::int4range; ERROR:  NULL range boundaries are not supported LINE 1: select '[ 2 , NULL )'::int4range; I think this might require more opinions. There is a trade-off here between convenience and

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-19 Thread Florian Pflug
On Sep19, 2011, at 15:33 , Robert Haas wrote: On Mon, Sep 19, 2011 at 1:51 AM, Jeff Davis pg...@j-davis.com wrote: select '[ 2 , NULL )'::int4range; ERROR: NULL range boundaries are not supported LINE 1: select '[ 2 , NULL )'::int4range; I think this might require more opinions. There is a

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-19 Thread Jeff Davis
On Mon, 2011-09-19 at 17:23 +0200, Florian Pflug wrote: The one reason I can see in favour of supporting N-U-L-L there is compatibility with arrays. But arrays actually do store and produce NULLs; ranges don't. I've recently had the questionable pleasure of writing PHP functions to parse

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-19 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Jeff Davis pg...@j-davis.com wrote: select '[ 2 , NULL )'::int4range; ERROR: NULL range boundaries are not supported LINE 1: select '[ 2 , NULL )'::int4range; I think this might require more opinions. There is a trade-off here between convenience

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-19 Thread Robert Haas
On Mon, Sep 19, 2011 at 11:23 AM, Florian Pflug f...@phlo.org wrote: On Sep19, 2011, at 15:33 , Robert Haas wrote: On Mon, Sep 19, 2011 at 1:51 AM, Jeff Davis pg...@j-davis.com wrote: select '[ 2 , NULL )'::int4range; ERROR:  NULL range boundaries are not supported LINE 1: select '[ 2 , NULL

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-19 Thread Florian Pflug
On Sep19, 2011, at 17:46 , Jeff Davis wrote: On Mon, 2011-09-19 at 17:23 +0200, Florian Pflug wrote: The one reason I can see in favour of supporting N-U-L-L there is compatibility with arrays. But arrays actually do store and produce NULLs; ranges don't. Hm, yeah, granted. But OTOH,

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-19 Thread Jeff Davis
On Mon, 2011-09-19 at 11:00 -0500, Kevin Grittner wrote: On a practical level, our shop is already effectively doing this. We have several tables where part of the primary key is effective date and there is a null capable expiration date -- with a NULL meaning that no expiration date has been

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-18 Thread Erik Rijkers
On Tue, September 13, 2011 10:41, Jeff Davis wrote: Another updated patch is attached. Hi, Below are 2 changes. The first change is an elog saying 'lower' instead of 'upper'. The second change is less straightforward, but I think it should be changed too: Rangetypes as it stands uses NULL

<    1   2