do 运算符参数中的串联不起作用
concatination in do operator argument doesn't work
do 中的连接不起作用
谁能解释一下原因
此代码有效:
do 'begin perform 2; end;';
最好说不会产生错误
还有:
do 'begin perform '||'2'||'; end;';
生成
ERROR: syntax error at or near "||"
LINE 1: do 'begin perform '||'2'||'; end;';
DO
的参数必须是字符串文字。
来自manual:
Parameters (...) code
(...) This must be specified as a string literal (...)
连接字符串的表达式不是文字。
do 中的连接不起作用
谁能解释一下原因
此代码有效:
do 'begin perform 2; end;';
最好说不会产生错误 还有:
do 'begin perform '||'2'||'; end;';
生成
ERROR: syntax error at or near "||"
LINE 1: do 'begin perform '||'2'||'; end;';
DO
的参数必须是字符串文字。
来自manual:
Parameters (...)
code
(...) This must be specified as a string literal (...)
连接字符串的表达式不是文字。