Re: additional json functionality

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: additional json functionality
Дата
Msg-id 30087.1384972565@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: additional json functionality  (David Johnston <polobo@yahoo.com>)
Ответы Re: additional json functionality
Список pgsql-hackers
David Johnston <polobo@yahoo.com> writes:
>> On 11/18/2013 06:13 AM, Peter Eisentraut wrote:
>>> We could do something like SQL/XML and specify the level of "validity"
>>> in a typmod, e.g., json(loose), json(strict), etc.

> Three things:

> 1) How would this work in the face of functions that erase typemod
> information?

You'd have to make the data self-identifying (which I think was the plan
already), and ensure that *every* function taking "json" could cope with
both formats on input.  The typmod could only be expected to be enforced
when storing or explicitly casting to one subformat, much like operations
on "numeric" pay little attention to the original precision/scale if any.

I agree that this solution isn't terribly workable, mainly because it'd
break any third-party C functions that take json today.
        regards, tom lane



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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: WITH ORDINALITY versus column definition lists
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: Add CREATE support to event triggers