我最近被这个“功能”咬了。
如果您的hstore
列未初始化并且您开始向其中添加条目,则它们都会被无声地吞下而不会出错。
这是预期的吗?
create table test_hstore(id int, map hstore);
insert into test_hstore(id,map) values(0, '');
INSERT 0 1
select * from test_hstore ;
id | map
----+-----
0 |
update test_hstore set map = map || hstore('key1', 'value1') where id = 0;
UPDATE 1
select * from test_hstore;
id | map
----+------------------
0 | "key1"=>"value1"
update test_hstore set map = null where id = 0;
UPDATE 1
select * from test_hstore;
id | map
----+--------
0 | (null)
update …
Run Code Online (Sandbox Code Playgroud) 是否可以设置keepalives_idle
参数.psqlrc
以便我打开的每个连接都使用它?
我终于找到了这个选项,它是我的连接断开问题的补救措施。
我真的很想为我打开的所有会话全局设置它psql
。