I am looking for help in adding a value 10
to an int[]
in PostgreSQL 9.5.
Looking at the documentation I should be able to use this format to update it but it is not working:
int[] + int push element onto array (add it to end of array)
I have tried running this:
update table1 set integer_array = integer_array + 10::Integer.
It did not work and I got this error:
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
I feel this is the same format like the one presented in the documentation on how to perform this operation.