From hstore to jsonb (type of column)

From: Alexandre Delanoë <debian(at)delanoe(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: From hstore to jsonb (type of column)
Date: 2015-03-31 08:11:01
Message-ID: 20150331081101.GA2759@delanoe.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Dear all,
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 ?

Replacing json by jsonb does not seem effective since there is no
hstore_to_jsonb fucntion apparently.

Many thanks for your help,

Best regards and many thanks for pgsql ecosystem.

--
Alexandre Delanoë

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Florian Schaetz 2015-03-31 09:13:51 Re: Optimize a big matrix select
Previous Message Stephen Davies 2015-03-30 23:59:20 Re: Link Office Word form document with data from PostgreSQL