can't cast hstore to json - Mailing list pgsql-general

From Joe Van Dyk
Subject can't cast hstore to json
Date
Msg-id CACfv+pKJui2OAX2WwtaK0DDWVenfhLGqsZUmKRot7R_JFRea9w@mail.gmail.com
Whole thread Raw
Responses Re: can't cast hstore to json  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: can't cast hstore to json  (Joe Van Dyk <joe@tanga.com>)
List 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

pgsql-general by date:

Previous
From: fluxh
Date:
Subject: Re: FATAL: the database system is starting up
Next
From: Susan Cassidy
Date:
Subject: puzzling perl DBI vs psql problem