Is there any other way to search for a certain value in an integer[] column in Postgres?
My currently installed Postgres version does not allow the following statement:
SELECT * FROM table WHERE values *= 10;
Array examples:
'{11043,10859,10860,10710,10860,10877,10895,11251}'
'{11311,10698,10697,10710,10712,10711,10708}'
The statement should return every row where the array contains '10710'.
For equality checks you can simply:
Read about ANY/SOME in the manual.
For big tables / big arrays consider array operators with index support, like:
See:
For integer arrays consider the additional module
intarray:Related: