1

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?

Ilya7cc
  • 11
  • 2
  • See https://stackoverflow.com/questions/35856652/spring-boot-mysql-database-initialization-error-with-stored-procedures – ancab Aug 25 '20 at 09:57

0 Answers0