Liquibase错误:未终止的美元引用字符串在或接近$ BODY $`
Liquibase error: unterminated dollar-quoted string at or near "$BODY$`
Chaneg log xml有一个条目:见下面 include file =/ home / dev /....../ admin_script.sql
Chaneg log xml has one entry: see below include file="/home/dev/....../admin_script.sql"
的内容file:
............... CREATE OR REPLACE FUNCTION my_schema.function-name() RETURNS smallint AS $BODY$ DECLARE v_next_gen_id smallint := 0; BEGIN ..........异常:
liquibase.exception.DatabaseException:执行SQL时出错CREATE OR REPLACE FUNCTION函数名称() ETURNS smallint AS $ BODY $ DECLARE v_next_gen_id smallint: = 0:错误:未终止的美元引用字符串为$ BODY $
liquibase.exception.DatabaseException: Error executing SQL CREATE OR REPLACE FUNCTION function name() ETURNS smallint AS $BODY$ DECLARE v_next_gen_id smallint := 0: ERROR: unterminated dollar-quoted string at or near "$BODY$
感谢您解决此问题的任何帮助
Appreciate any help to resolve this
推荐答案我刚刚遇到同样的问题走。
I just encountered the same issue days ago.
如果我们使用以下格式将变更集添加到changelog.xml文件中,它不起作用: < include file =path / to / sqlfile/>
It does not work if we add the changeset into changelog.xml file using the format below: <include file="path/to/sqlfile" />
要解决此问题,我使用其他格式:
To work around, I use another format:
<changeSet author="authour_name" id="your_id"> <sqlFile path="path/to/sqlfile" splitStatements="false"/> </changeSet>以下链接简要解释了美元引用的postgresql问题。
Here is the link which gives a brief explanation to Problem with dollar-quoted-in-postgresql.
更多推荐
Liquibase错误[Postgresql]:未结算的美元引用字符串或者附近“$ BODY $
发布评论