Answer the question
In order to leave comments, you need to log in
How to implement Postgres array search with ILIKE?
I have a table like this in a database
CREATE TABLE public."Releases" (
id uuid NOT NULL,
name character varying(150) COLLATE pg_catalog."default" NOT NULL,
english character varying(150) COLLATE pg_catalog."default",
synonyms character varying(150)[] COLLATE pg_catalog."default" NOT NULL DEFAULT (ARRAY[]::character varying[])::character varying(150)[]
) WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public."Releases"
OWNER to postgres;
SELECT * FROM "public"."Releases" WHERE synonyms ILIKE '%test%'
ОШИБКА: оператор не существует: character varying[] ~~* unknown
СТРОКА 1: SELECT * FROM "public"."Releases" WHERE synonyms ILIKE '%tes...
^
ПОДСКАЗКА: Оператор с данными именем и типами аргументов не найден. Возможно, вам следует добавить явные приведения типов.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question