You need to double up your single-quotes inside the outermost single-quotes.
select dblink_exec('...', ' insert into ... values(''2013-01-01 ... '')');
Domanda
The below statement is failing by saying syntax error, I do not see the syntax error, please help:
SELECT dblink_exec(
'dbname=billing user=billing password=billing port=5432',
'insert into md.radacct values('2013-01-01 00:00:00+01:30')');
table was created like this
create table md.radacct(date_time timestamp with time zone);
Soluzione
You need to double up your single-quotes inside the outermost single-quotes.
select dblink_exec('...', ' insert into ... values(''2013-01-01 ... '')');