我在添加值寻求帮助10到int[]PostgreSQL中9.5.
查看文档我应该能够使用这种格式来更新它,但它不起作用:
int[] + int push element onto array (add it to end of array)
Run Code Online (Sandbox Code Playgroud)
我试过运行这个:
update table1 set integer_array = integer_array + 10::Integer.
Run Code Online (Sandbox Code Playgroud)
它没有用,我收到了这个错误:
ERROR: operator does not exist: integer[] + integer
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 67
Run Code Online (Sandbox Code Playgroud)
我觉得这与文档中提供的有关如何执行此操作的格式相同.