From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Oid registry |
Date: | 2012-09-25 08:06:43 |
Message-ID: | CA+U5nM+ZWXiA6BB6=iZrJCiVH1U6aqXU1xs9dkGJF8AdcmUMXg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 24 September 2012 21:26, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
> On 09/24/2012 09:37 PM, Peter Eisentraut wrote:
>>
>> On Mon, 2012-09-24 at 18:59 -0400, Andrew Dunstan wrote:
>>>
>>> This rather overdue mail arises out the developer's meeting back in
>>> May, where we discussed an item I raised suggesting an Oid registry.
>>>
>>> The idea came from some difficulties I encountered when I did the
>>> backport of the JSON work we did in 9.2 to 9.1, but has wider
>>> application. Say someone writes an extension that defines type A. You
>>> want to write an extension that takes advantage of that type, but it's
>>> difficult if you don't know the type's Oid,
>>
>> Could you fill the rest of us in with some technical details about why
>> this might be necessary and what it aims to achieve?
>
>
> Well, an obvious case is how record_to_json handles fields. If it knows
> nothing about the type all it can do is output the string value. That
> doesn't work well for types such as hstore. If it could reliably recognize a
> field as an hstore it might well be able to do lots better.
I think we're missing something in the discussion here.
Why can't you find out the oid of the type by looking it up by name?
That mechanism is used throughout postgres already and seems to work
just fine.
Why would we need to hardcode it?
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2012-09-25 08:37:35 | Re: Oid registry |
Previous Message | Heikki Linnakangas | 2012-09-25 07:37:29 | Re: Configuration include directory |