Re: Oid registry

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Oid registry
Дата
Msg-id 3665.1348544370@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Oid registry  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Oid registry  (Hitoshi Harada <umi.tanuki@gmail.com>)
Re: Oid registry  (Andrew Dunstan <andrew@dunslane.net>)
Re: Oid registry  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 09/24/2012 09:37 PM, Peter Eisentraut wrote:
>> 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.

Um ... that is an entirely unconvincing use case.  We would not put any
code into core that knows specifically about a non-core datatype, or
at least I sure hope we'd not do such a klugy thing.  It would be far
better to invent an extensibility scheme (plug-in of some sort) for
record_to_json.

My recollection of the PGCon discussion is that people wanted to allow
client-side code to hard-wire type OIDs for add-on types, in more or
less the same way that things like JDBC know that "25" is "text".
That's not unreasonable, since the alternatives are complicated and
not all that reliable.  I'm not sure the usage applies to anything
except data types though, so at least for starters I'd only want to
accept reservations of OIDs for data types.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Oid registry
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Switching timeline over streaming replication