xmlcomment()

一个用于生成XML注释的函数。

xmlcomment() 是一个用于生成XML注释的系统函数。

xmlcomment() 函数是在 PostgreSQL 8.3 中添加的。

用法

xmlcomment ( text ) → xml

提供的文本不能包含“--”或以“-”结尾。

变更历史

示例

xmlcomment() 的基本用法示例

postgres=# SELECT xmlcomment('foo');
 xmlcomment 
------------
 <!--foo-->
(1 row)

无效输入字符串示例

postgres=# SELECT xmlcomment('--foo');
ERROR:  invalid XML comment

postgres=# SELECT xmlcomment('foo--bar');
ERROR:  invalid XML comment

postgres=# SELECT xmlcomment('foo-');
ERROR:  invalid XML comment

分类

系统函数, XML

反馈

在此处提交关于“xmlcomment()”的任何评论、建议或更正 这里