Re: From hstore to jsonb (type of column)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: From hstore to jsonb (type of column)
Дата
Msg-id 16364.1427810559@sss.pgh.pa.us
обсуждение исходный текст
Ответ на From hstore to jsonb (type of column)  (Alexandre Delanoë <debian@delanoe.org>)
Ответы Re: From hstore to jsonb (type of column)  (Alexandre Delanoë <debian@delanoe.org>)
Список pgsql-novice
Alexandre =?iso-8859-1?Q?Delano=EB?= <debian@delanoe.org> writes:
> from hstore to json, I use this:

> ALTER TABLE ONLY mytable
> ALTER COLUMN mycolumn
> TYPE JSON
> USING hstore_to_json(mycolumn)
> ;

> ALTER TABLE ONLY mytable
> ALTER COLUMN mycolumn
> SET DEFAULT '{}'::json
> ;

> But what would it become for jsonb ?

Just do "USING hstore_to_json(mycolumn)::jsonb".  Eventually there
will probably be direct jsonb equivalents of all the existing
json transform functions, but they're not all there yet.

            regards, tom lane


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

Предыдущее
От: Florian Schaetz
Дата:
Сообщение: Re: Optimize a big matrix select
Следующее
От: Alexandre Delanoë
Дата:
Сообщение: Re: From hstore to jsonb (type of column)