Open cangcool opened 10 years ago
You have changed the name of the country! And what more, you have done it only in PostgreSQL format!
The correct solution is to escape that apostrophe using proper method. Escaping character \
is wrong becuase in PostgreSQL it is done trough the double apostrophe ''
as explained eg. here: http://stackoverflow.com/a/12320729
I've just run across this bug as well. The current SQL does not run to completion because of the quotation issue with 'People\'s Democratic Republic of Yemen'
. It should be 'People''s Democratic Republic of Yemen'
(notice the two single quotes), as per http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html (section 4.1.2.1).
It seems that adding these quotes is the responsiblity of the Zend framework you're using, specifically the Platform object in the call:
->getSqlString($this->getPlatform())
. The Platform object is supposed to supply the platform-dependent quoting style. The Zend framework seems to be using an old style (\') which newer version of Postgresql don't support. The offending line seems to be here:
@jlbooker Thanks for your input. Then we should report it to zf https://github.com/zendframework/zf2/issues/new.
@umpirsky Yes, definitely sounds like it should be reported to ZendFramework. I don't have the Zend Framework installed anywhere though, so I can't rebuild, test, nor reproduce the problem with the latest version of ZF. I'll leave it for you to report if you'd like.
When I imported this file on pgAdmin III, I've got error on line 185, because of "\'". Maybe its better to remove it After removed it, I imported it successfully. Many thanks