I have a LTREE Field, called house_path, this query works for me:
WHERE house_path ~ '*.35.*';
However this query doesn't work for me:
WHERE house_path ~ '*.35.*'::text;
-> operator does not exist: ltree ~ text
Which type has the second argument to have? So that it works? I'm asking because I would like to write a function where I can pass the second argument as variable. And I don't know what type the second variable should be.