xmlcomment() 是一个用于生成XML注释的系统函数。
xmlcomment() 函数是在 PostgreSQL 8.3 中添加的。
示例
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
参考资料
- PostgreSQL 文档: Xmlcomment
