Is there a better way to get a table row in hstore format than go
SELECT hstore(ARRAY['col1','col2','col3'], ARRAY[col1::text, col2::text, col3::text]) FROM tbl;
This works, but I believe there should be a better way than printing each column. hstore takes the type of entry to input, but I could not figure out how to submit a request to create a single line to a function and make it happy. Postgres version 9.0.4.
source share