Is there a way to remove a value from an array in pgSQL? Or to be more precise, to pop the last value? Judging by this list the answer seems to be no. I can get the result I wan
There IS a SIMPLE way to remove a value from an array in PLAIN SQL:
SELECT unnest('{5,NULL,6}'::INT[]) EXCEPT SELECT NULL
it will remove all NULL values from array. Result will be:
#| integer | ------------ 1| 5 | 2| 6 |