Re: WIP: Range Types

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: Range Types
Date: 2011-01-09 02:58:43
Message-ID: AANLkTinkdWO0SaahfDCgqU-KELu7N=oWA+bw8J+9x_m-@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 8, 2011 at 9:12 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>> Oh, hmm.  What generic functions did you have in mind?
>
> Well, input/output, comparisons, overlaps, intersection, minus, and all
> the necessary GiST support functions.
>
> Without generic functions, the only choices we have are:
>  * force the user to write and specify them all -- which doesn't leave
> much left of my feature (I think the interface would be all that's
> left).
>  * somehow generate the functions at type creation time
>
> Any other ideas?

Do they have to be good ideas?

I mean, one semi-obvious possibility is to write one set of C
functions that can have multiple SQL-level definitions bound to it.
Then when the function is called, it can peek at flinfo->fn_oid to
figure out which incarnation was called and then get the typo info
from there. That's ugly, though.

It'd be really nice if we could just arrange for the info on which
type anyrange actually is at the moment to be available in the right
place. Storing it on disk to work around that is pretty horrible, but
maybe there's no other reasonable option.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-09 03:06:43 Re: SSI patch(es)
Previous Message Jeff Davis 2011-01-09 02:12:00 Re: WIP: Range Types