Some fixes

Added 'regexp' to keywords that has to be escaped whether it is a column name
CREATE TABLE attachments (
    regexp character varying(255) DEFAULT ''::character varying,
);

Fixed escaping quotes for CREATE INDEX -> ALTER TABLE case
CREATE INDEX index_issue_statuses_on_position ON issue_statuses USING btree ("position");

Fixed multiline INSERT escaping: better catching of the end of command, quote backslashes before single quote i.e. 'C:\'
INSERT INTO journals VALUES (4277, 1693, 'Issue', 1, 'I put a copy of the in \\Dev\Datasets\', '2011-08-26', false);
INSERT INTO journals VALUES (4277, 1693, 'Issue', 1, 'Some test
function qq();
\\Dev\Datasets\', '2011-08-26', false);