문제

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);
도움이 되었습니까?

해결책

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

select dblink_exec('...', ' insert into ... values(''2013-01-01 ... '')');
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top