CREATE INDEX ix1 ON Contacts (ALL ARRAY email.address FOR email IN emails END) WHERE _type = "contact";
\set -$eid "al%"
SELECT DISTINCT email.address
FROM Contacts AS C
UNNEST C.emails AS email
WHERE C._type = "contact" AND email.address LIKE $eid;
Yeah that’s what i ended up doing so the the general answer is there is no way co concatenate in the actual
query string a place holder like $1 and the “%”. If so would have been much cleaner then passing $1 + “%” as