Re: data to json enhancements
От | Andrew Dunstan |
---|---|
Тема | Re: data to json enhancements |
Дата | |
Msg-id | 5065A011.2020909@dunslane.net обсуждение исходный текст |
Ответ на | Re: data to json enhancements (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: data to json enhancements
|
Список | pgsql-hackers |
On 09/28/2012 08:22 AM, Peter Eisentraut wrote: >> (3) Invent an auxiliary type along the lines of "json_value" and say >> that you create a cast from foo to json_value when you want one >> interpretation, or directly to json if you want the other. Then >> things like record_to_json would look for the appropriate type of cast. >> This is a bit ugly because the auxiliary type has no reason to live >> other than to separate the two kinds of cast, but it avoids creating >> any new JSON-specific mechanisms in the type system. > What if some wanted to create a yaml type as an extension. How would > they associate yaml and yaml_value? Well, of course it wouldn't be a problem if the code could know the OID of yaml_value ... :-) cheers andrew
В списке pgsql-hackers по дате отправления: