Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

psql:ERROR: syntax error at or near "" LINE 1: 

I'm executing fn_reset_eta_transactional_data(); function through linux machine. The function is for more then 100 schema. After running the script I'm getting

psql:/patha/query.sql:2: ERROR: syntax error at or near "" LINE 1: .

Please help.

like image 909
raj verma Avatar asked Dec 09 '15 07:12

raj verma


1 Answers

I had the same problem: check the encoding of your script. Probably it UTF-8_BOM. So, I converted it to UTF-8 and error disappears. explanation

like image 108
Alex Silkovsky Avatar answered Sep 24 '22 19:09

Alex Silkovsky