Skip site navigation (1) Skip section navigation (2)

Re: Singleton range constructors versus functional coercion notation

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Singleton range constructors versus functional coercion notation
Date: 2011-11-21 03:24:16
Message-ID: 1321845856.11794.65.camel@jdavis (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, 2011-11-19 at 15:57 -0500, Tom Lane wrote:
> > I'm hesitant to remove them because the alternative is significantly
> > more verbose:
> >   numrange(1.0, 1.0, '[]');
> Right.  The question is, does the case occur in practice often enough
> to justify a shorter notation?  I'm not sure.

Well, if there were a good shorter notation, then probably so. But it
doesn't look like we have a good idea, so I'm fine with dropping it.

> One thing I've been thinking for a bit is that for discrete ranges,
> I find the '[)' canonical form to be surprising/confusing.  If we
> were to fix range_adjacent along the lines suggested by Florian,
> would it be practical to go over to '[]' as the canonical form?
> One good thing about that approach is that canonicalization wouldn't
> have to involve generating values that might overflow.

I think we had that discussion before, and Florian brought up some good
points (both then and in a reply now). Also, Robert wasn't convinced
that '[]' is necessarily better for discrete ranges:

	Jeff Davis

In response to


pgsql-hackers by date

Next:From: Etsuro FujitaDate: 2011-11-21 03:55:49
Subject: Re: WIP: Collecting statistics on CSV file data
Previous:From: Peter GeogheganDate: 2011-11-21 02:02:06
Subject: Re: Inlining comparators as a performance optimisation

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group