I am writing a function where I declare a variable of type text[]
. Must use values in SELECT
, with IN
.
DO $$
declare
ids uuid[] := array['00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000'...];
begin
SELECT * from "table"
where "Id" IN (projectIds);
end
$$;
But this way it doesn't work. I try to google, everywhere very strange ways. That declare third-party types. That IDs are indicated in a temporary table.