Renaming hstore key in PostgreSQL 9.2
问题 I've been evaluating PostgreSQL's hstore functionality (9.2) and the only thing the fine manual isn't explicit about is how to rename keys. For instance, how could I rename the key c to ai_count ? "c"=>"3", "ai_voltage"=>"3", "ai_temperature"=>"28" I'm thinking there is no direct way to do this and that it involves duplicating the c key to a ai_count key, then dropping the c key. How can I do this, ideally as a one-liner which can be applied to multiple records? 回答1: I think you're right that