Re: Range Types and length function

From: Greg Stark <stark(at)mit(dot)edu>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Range Types and length function
Date: 2011-06-26 12:45:20
Message-ID: BANLkTineSD6D3R+dUiz5iiTE75+NUNAn7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 26, 2011 at 8:18 AM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>  * it needs to know the result type of that function, which might not be
> the subtype (for instance, for timestamp the difference type would be
> interval)

What's the use case for the length() function? Is it for users to be
able to display useful information about their ranges? Or is it for
implementing things like GIST indexes?

For the latter a length function that always returns a float might be
more useful. Even if it isn't guaranteed to always be perfectly
precise, that is if ranges of similar length sometimes returned
identical values, at least it could be used for things like penalty().

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-06-26 13:05:45 Re: Repeated PredicateLockRelation calls during seqscan
Previous Message Heikki Linnakangas 2011-06-26 10:18:06 Re: WIP: Fast GiST index build