json_array_elements_text?

Поиск
Список
Период
Сортировка
От Laurence Rowe
Тема json_array_elements_text?
Дата
Msg-id CAOycyLQcR=Fr6QzLpe_AL10oVPxkpA-jA1jniZ7JuAsZsSf30w@mail.gmail.com
обсуждение исходный текст
Ответы Re: json_array_elements_text?
Список pgsql-general
Hello,

I'm trying to unpack a json array into it's constituent text values so I can join them to a table. I can successfully unpack json values, but am having trouble converting these to text so I can cast them to the UUIDs needed for the join.


SELECT trim(json_array_elements(biosample.properties->'treatments')::text, '"')::uuid
FROM object biosample WHERE biosample.item_type = 'biosample'

But it seems kinda ugly. Am I missing something obvious or is postgres 9.3 just missing a json_array_elements_text function?


Laurence

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

Предыдущее
От: Chris Travers
Дата:
Сообщение: Re: PostgreSQL with ZFS on Linux
Следующее
От: Sameer Kumar
Дата:
Сообщение: Re: Correct query to check streaming replication lag