Re: Duplicate JSON Object Keys

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: Duplicate JSON Object Keys
Дата
Msg-id 3E5EE5E6-2013-46B4-8731-F82C7C9E28AD@justatheory.com
обсуждение исходный текст
Ответ на Re: Duplicate JSON Object Keys  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Duplicate JSON Object Keys  (Hannu Krosing <hannu@2ndQuadrant.com>)
Список pgsql-hackers
On Mar 13, 2013, at 5:17 AM, Robert Haas <robertmhaas@gmail.com> wrote:

> What I think is tricky here is that there's more than one way to
> conceptualize what the JSON data type really is.  Is it a key-value
> store of sorts, or just a way to store text values that meet certain
> minimalist syntactic criteria?  I had imagined it as the latter, in
> which case normalization isn't sensible.  But if you think of it the
> first way, then normalization is not only sensible, but almost
> obligatory.

That makes a lot of sense. Given the restrictions I tend to prefer in my database data types, I had imagined it as the
former.And since I'm using it now to store key/value pairs (killing off some awful EAV implementations in the process,
BTW),I certainly think of it more formally as an object. 


But I can live with the other interpretation, as long as the differences are clearly understood and documented. Perhaps
anote could be added to the docs explaining this difference, and what one can do to adapt for it. A normalizing
functionwould certainly help. 

Best,

David




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Writable foreign tables: how to identify rows
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: Duplicate JSON Object Keys