Re: json indexing and data types

Поиск
Список
Период
Сортировка
От Kaare Rasmussen
Тема Re: json indexing and data types
Дата
Msg-id 565FC73A.60907@jasonic.dk
обсуждение исходный текст
Ответ на Re: json indexing and data types  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: json indexing and data types  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-general
On 2015-12-03 01:04, Jim Nasby wrote:
> We have a client that has a similar (though also a bit different)
> need. Specifically, they get an XML document that has element
> attributes that tell you what data type the element should contain. We
> convert the XML to JSON (easy thanks to plpython), which produces a
> bunch of nested JSON objects (typed as specifically as possible in
> JSON). The XML attributes get turned into items in an object. So

OK, AFAIUI, you added the schema to each row. I think that I have fewer
variations, so perhaps the information would live better outside, but
that's a detail. Turning them into tables and views is a good way to
represent the indexable data. Functionally, it seems to me to be almost
the same as functional indexing, but much more transparent, and easier
to write a query for,

> Are you in control of the JSON itself, and are the number of
> permutations known in advance? It might be that something like table
> inheritance is a better solution...

Yes, I can alter the db specification. Not sure how table inheritance
would help, though?

/kaare


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

Предыдущее
От: mdaswani
Дата:
Сообщение: Support for hardware tokens for server/replication private key
Следующее
От: Kaare Rasmussen
Дата:
Сообщение: Re: json indexing and data types