Re: [GENERAL] hstore to json and back again

2014-07-01 Thread Paul Jungwirth
> I'm trying to migrate an existing hstore column to json in Postgres > 9.3, and I'd like to be able to run the script in reverse. To answer my own question, this partially solves the problem for me (foo.datahash_new has json, foo.datahash_old has hstore): connection.select_rows(<<-EOQ).each

[GENERAL] hstore to json and back again

2014-07-01 Thread Paul Jungwirth
Hello, I'm trying to migrate an existing hstore column to json in Postgres 9.3, and I'd like to be able to run the script in reverse. I know not all JSON can turn back into hstore, but since this is coming from an old hstore column, I know the structure is flat (no nesting), and that all values ar