It doesn't matter if I try to execute this with a TSQLQuery or TSQLScript, I always get this error:Code: Text [Select][+][-]Primary Error: unterminated dollar-quoted string at or near "$do$In pgAdmin it works as expected.