有没有办法将一长行 PL/pgSQL 代码拆分成多行?我的上下文是一个触发器函数,我按照以下方式将插入记录到表中:
INSERT INTO insert_log (log_time, description)
VALUES (
now()
, 'A description. Made up of 3 semi long sentences. That I want to split, in the code, not in the log table, over 3 lines for readability.'
);
Run Code Online (Sandbox Code Playgroud)
a_h*_*ame 30
如手册中所述,字符串常量可以拆分为多行
INSERT INTO insert_log (log_time, description)
VALUES (
now()
, 'A description. Made up of 3 semi long sentences. '
'That I want to split, in the code, not in the log table, '
'over 3 lines for readability.'
);
Run Code Online (Sandbox Code Playgroud)