Here's my code:
.having('(COUNT(DISTINCT taggings.tag_id) = 0 OR array[?] <@ array_agg(taggings.tag_id))', tag_ids)
I am getting the followint error when executing the above query:
ActiveRecord::StatementInvalid: PG::UndefinedFunction: ERROR: operator does not exist: text[] <@ integer[]
LINE 1: ...OUNT(DISTINCT taggings.tag_id) = 0 OR array[NULL] <@ array_a...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
I'm new to the postgresql, can anyone please point the solution?