【发布时间】:2020-02-15 16:17:38
【问题描述】:
我在 postgres 中有一个表,其中包含 id_0、turnr 和标签这三列。标签列数据类型为 hstore。 目前我正在使用这个不起作用的查询
INSERT INTO relation_15_02_2020 (tags)
VALUES
(
'
"type"=>"restriction",
"restriction"=>"(select distinct(turnr) from relation_15_02_2020 ) "
'
);
如何添加
"type"=>"restriction",
"restriction"=>" turnr value for respective id
id_0 =1 标签的期望输出
{"type"=>"restriction","restriction"=>"NoRightTurn"}
【问题讨论】:
标签: postgresql hstore