更新时间:2023-11-30 19:27:16
您缺少 e
就在换行文字之前(对于像c的特殊字符来说是必需的):
You are missing e
right before new line literal (it is required for c-like special chars):
SELECT message, CASE WHEN length(message) > 100
THEN message||e'\n' end as res FROM msg.list_trx
查看 http://www.postgresql.org/ docs / 9.0 / static / sql-syntax-lexical.html
4.1.2.2。带有C样式转义符的字符串常量
4.1.2.2. String Constants with C-Style Escapes
以获取更多信息。