Question

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);
Was it helpful?

Solution

You need to double up your single-quotes inside the outermost single-quotes.

select dblink_exec('...', ' insert into ... values(''2013-01-01 ... '')');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top