We're using testcontainers in integration test with DB. To setup initial state of DB we use container method withInitScript(*pathToScript*). Under the hood it uses org.postgresql.jdbc.PgStatement class to execute query. But an executing fails if sqlQuery contains function/procedure with $$ delimiter. The solution is to replace $$ with ', but it takes long time to control sql sqript and keep in mind necessity of replacing delimiter.
There is related question, but no solution: Exception in JPA when using seed file for PostgreSQL
Is it possible to point a type of delimiter or something like that?