From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Florian Pflug <fgp(at)phlo(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Range Types, constructors, and the type system |
Date: | 2011-07-06 19:14:30 |
Message-ID: | 25069.1309979670@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> On Wed, 2011-07-06 at 12:51 -0400, Robert Haas wrote:
>> On Wed, Jul 6, 2011 at 12:22 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>>> To get into some more details: how exactly would this constructor be
>>> generated on the fly? Clearly we want only one underlying C function
>>> that accepts something like:
>>> range_internal(lower, upper, flags, Oid rangetype)
>>> So how do we get the rangetype in there?
>> I think that the C function could call get_call_result_type() and get
>> the return type OID back via the second argument.
> I'm also a little unclear on the rules for when that might be set
> properly or not.
> I ran into problems with that before... I think with the I/O functions.
> I don't think that's a problem here, but I thought I'd ask.
I think it'd probably be all right to do that. The places where you
might find shortcuts being taken are where functions are called directly
by C code, such as I/O function calls --- but these constructors should
only ever get invoked from SQL queries, no?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-07-06 19:17:44 | Re: reducing the overhead of frequent table locks, v4 |
Previous Message | Robert Haas | 2011-07-06 19:06:40 | Re: Make relation_openrv atomic wrt DDL |