I have a POSTGRES field with 2 fields - integer arrayfield and integer field.
CREATE TABLE test.public.polls (
"id" serial NOT NULL,
field_1 _int4,
field_2 int4 NOT NULL,
PRIMARY KEY ("id")
);
and the values are
1) Now I need to check if any of the field value {1,2,3} is in the field_1
something like this -
select * from test.public.polls
where field_1 = ANY ('{1,2,3}'::int[])
but this throws an error
operator does not exist: integer[] = integer
2) Need to check if any of the id values = {2,3,4} is in the field_1
select * from test.public.polls
where field_1 = array(id)
not sure what should be the syntax for this.

field_1definition befield_1 in4[]?field_1and{1, 2, 3}have any common elements? Does second question mean: get records wherefield_1array containsidfield?