Re: Duplicate JSON Object Keys

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Duplicate JSON Object Keys
Дата
Msg-id 514075B9.6060306@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Duplicate JSON Object Keys  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Duplicate JSON Object Keys  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On 03/13/2013 08:17 PM, Robert Haas wrote:
> I think Andrew and I had envisioned this as basically a text data type
> that enforces some syntax checking on its input, hence the current
> design.  But I'm not sure that's the ONLY sensible design.
We're probably stuck with it at this point, but it may well be worth
considering the later introduction of a compatible `jsonobj` that stores
parsed and normalized json objects in some internal format the client
doesn't have to care about, like serialized V8 JS VM objects.

I suspect that such a type is better offered by a contrib until/unless
PL/V8 or a similar becomes a core language. It'd be nuts to try to
re-implement all of the JSON and javascript object functionality in a
javascript engine when we can just plug an existing one in and use its
JSON and javascript object manipulation. The minimalist approach makes
sense for the json type precisely because it's just validated text, but
I don't think it makes sense to continually extend it and slowly
reinvent a whole javascript engine in Pg.

If we're going to do things like normalizing json I think that's a job
for a real JavaScript engine that understands Javascript objects.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services




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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Duplicate JSON Object Keys