Re: Range Types - typo + NULL string constructor
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: David Fetter <david@fetter.org>, Florian Pflug <fgp@phlo.org>, Thom Brown <thom@linux.com>, Tom Lane <tgl@sss.pgh.pa.us>, Erik Rijkers <er@xs4all.nl>, pgsql-hackers@postgresql.org
Date: 2011-10-11T16:40:32Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Replace the "New Linear" GiST split algorithm for boxes and points with a
- 7f3bd86843e5 9.2.0 cited
On Tue, Oct 11, 2011 at 12:30 PM, Jeff Davis <pgsql@j-davis.com> wrote: > On Tue, 2011-10-11 at 12:09 -0400, Robert Haas wrote: >> The cure seems worse than the disease. What is so bad about '[]'? > > OK, so we stick with the 3-argument form. Do we have a default for the > third argument, or do we scrap it to avoid confusion? > > There were some fairly strong objections to using '[]' as the default or > having the default vary between types. So, the only real option > remaining, if we do have a default, is '[)'. I think using '[)' is fine. At some level, this is just a question of expectations. If you expect that int4range(1,4) will create a range that includes 4, well, you're wrong. Once you get used to it, it will seem normal, and you'll know that you need to write int4range(1,4,'[]') if that's what you want. As long as the system is designed around a set of consistent and well-thought-out principles, people will get used to the details. I don't see that the idea of a half-open range over a discrete-valued type is particularly confusing - we use them all the time in programming, when we make the end pointer point to the byte following the end of the array, rather than the last element - but even if it is, overall design consistency trumps what someone may find to be the absolutely perfect behavior in some particular case. And saving typing is nearly always good - unless it creates a LOT more confusion than I think this will. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company