| From: | Joe Van Dyk <joe(at)tanga(dot)com> |
|---|---|
| To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: can't cast hstore to json |
| Date: | 2014-03-13 19:22:13 |
| Message-ID: | CACfv+p+cb-SJtKgFQuUYd42bkHLTCweqm7Zc0JoscOeQRL920w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, Mar 13, 2014 at 12:15 PM, Joe Van Dyk <joe(at)tanga(dot)com> wrote:
> 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
>
ALTER EXTENSION hstore UPDATE; fixed the problem. (thanks oicu!)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2014-03-13 19:22:36 | Re: can't cast hstore to json |
| Previous Message | Susan Cassidy | 2014-03-13 19:18:55 | puzzling perl DBI vs psql problem |