Liquibase错误[Postgresql]:未结算的美元引用字符串或者附近“$ BODY $

编程入门 行业动态 更新时间:2024-10-25 02:25:10
本文介绍了Liquibase错误[Postgresql]:未结算的美元引用字符串或者附近“$ BODY $的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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 $

本文发布于:2023-10-22 22:26:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1518910.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符串   错误   美元   未结算   Liquibase

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!