plpgsql function text concatenation error
Can any one correct below statement?
strdir := 'copy '
|| t_na开发者_StackOverflow社区me.relname
|| ' from E'''' || C: || '''''
|| t_name.relname || '''.txt'' using delimiters '|'';
strdir := 'copy '
|| t_name.relname
|| ' from E''C:"' -- one ' to many here, included C:, which had no '
-- and I suspect you need a double quote here "
|| t_name.relname
|| '".txt'' using delimiters ''|'''; -- closing ", double ' around |
I think the single quotes around the last |
should be two single quotes each.
精彩评论