can't cast hstore to json

From: Joe Van Dyk <joe(at)tanga(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: can't cast hstore to json
Date: 2014-03-13 19:15:27
Message-ID: CACfv+pKJui2OAX2WwtaK0DDWVenfhLGqsZUmKRot7R_JFRea9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've got a postgresql 9.3.2 server, compiled from scratch. Getting this
error:

# select hstore('a', 'b')::json;
ERROR: cannot cast type hstore to json
LINE 1: select hstore('a', 'b')::json;
^
# select array_to_json(array[hstore('a', 'b')]);
array_to_json
------------------
["\"a\"=>\"b\""]
(1 row)

(I expected [{"a": "b"}] )

I don't get this on other postgresql installations. Any ideas?

Joe

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Susan Cassidy 2014-03-13 19:18:55 puzzling perl DBI vs psql problem
Previous Message Johannes Bauer 2014-03-13 12:15:56 Re: UNIQUE contraint that is initially deferred in Postgres 8.4.13