【发布时间】:2019-12-16 13:26:52
【问题描述】:
我想在具有 Hstore 列的表中插入多条记录。 我怎样才能做到这一点? col3: hstore 数据类型
INSERT INTO my_table (col1, col2, col3) VALUES ("abc",123,'"property1"=>"hello","property2"=>"hi"'), ("xyz",345,'"property1"=>"hello1","property"=>"hi1"'), ("weq",23,'"property1"=>"hello2","property"=>"hi2"')
此格式以字符串格式添加 hstore 中的记录。我希望它像我可以访问的键:值哈希
【问题讨论】:
标签: sql ruby-on-rails postgresql hstore