Flyway and Postgres meta-commands
-
12-06-2021 - |
Domanda
I would like to use psql meta-commands (http://www.postgresql.org/docs/9.1/static/app-psql.htm) with flyway. However, when I do something like
\set foo bar
I get this exception:
[flyway:migrate] com.googlecode.flyway.core.exception.FlywayException: Error executing statement at line 4: \set foo bar
[flyway:migrate] Caused by org.postgresql.util.PSQLException: ERROR: syntax error at or near "\"
[flyway:migrate] Position: 1
I suppose that the psql interpreter is not running. Is that correct? Is there a way to use something like meta-commands? Should I just make more extensive use of flyway placeholders?
Soluzione
psql commands ONLY work via the psql client. Client drivers do not implement these commands.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow