Postgresql – String concatenation with dollar-quoting
I use concatenation to prepare a query string with parameter values When I use single quotes: p_ReqStr_old := ' with prm as ( select 1::int4 as id, ' || ' to_timestamp(''' || to_char(p_BegRepDate, 'DD.MM.YYYY') || ''',''DD.MM.YYYY'')::timestamp as p_BegDate, to_timestamp(''' ||…