{"action":"closed","issue":{"url":"https://api.github.com/repos/dimitri/pgloader/issues/669","repository_url":"https://api.github.com/repos/dimitri/pgloader","labels_url":"https://api.github.com/repos/dimitri/pgloader/issues/669/labels{/name}","comments_url":"https://api.github.com/repos/dimitri/pgloader/issues/669/comments","events_url":"https://api.github.com/repos/dimitri/pgloader/issues/669/events","html_url":"https://github.com/dimitri/pgloader/issues/669","id":272888356,"number":669,"title":"BEFORE LOAD DO // AFTER LOAD DO syntax error","user":{"login":"steffenmllr","id":449563,"avatar_url":"https://avatars0.githubusercontent.com/u/449563?v=4","gravatar_id":"","url":"https://api.github.com/users/steffenmllr","html_url":"https://github.com/steffenmllr","followers_url":"https://api.github.com/users/steffenmllr/followers","following_url":"https://api.github.com/users/steffenmllr/following{/other_user}","gists_url":"https://api.github.com/users/steffenmllr/gists{/gist_id}","starred_url":"https://api.github.com/users/steffenmllr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steffenmllr/subscriptions","organizations_url":"https://api.github.com/users/steffenmllr/orgs","repos_url":"https://api.github.com/users/steffenmllr/repos","events_url":"https://api.github.com/users/steffenmllr/events{/privacy}","received_events_url":"https://api.github.com/users/steffenmllr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-10T10:33:12Z","updated_at":"2017-11-13T13:23:50Z","closed_at":"2017-11-13T13:23:50Z","author_association":"NONE","body":"Hey there. I'my trying to import some csv to postresql and run some before / after commands mit it looks like my synax is wrong. I couldn't find an example with `BEFORE` and `AFTER` in the tests or in the docs. any suggestions ?\r\n\r\n```\r\nLOAD CSV\r\n    FROM './test.csv' (id, text)\r\n    INTO postgresql://test:test@localhost/test?test (id, test)\r\n\r\n    WITH truncate,\r\n        skip header = 1,\r\n        fields optionally enclosed by '\"',\r\n        fields escaped by double-quote,\r\n        fields terminated by ';'\r\n\r\n    SET client_encoding to 'latin1',\r\n        work_mem to '12MB',\r\n        standard_conforming_strings to 'on'\r\n\r\n    BEFORE LOAD DO\r\n        $$ drop table if exists test; $$,\r\n        $$ create table test(id int, text varchar(4)); $$;\r\n\r\n    AFTER LOAD DO\r\n        $$ drop table if exists test; $$,\r\n        $$ create table test(id int, text varchar(4)); $$;\r\n```\r\n\r\nError:\r\n\r\n```\r\nFATAL error: At\r\n\r\n\r\n      AFTER LOAD DO\r\n\r\n      ^ (Line 19, Column 4, Position 502)\r\n\r\nIn context COMMANDS:\r\n\r\nWhile parsing COMMANDS. Expected:\r\n\r\n     the character Tab\r\n  or the character Newline\r\n  or the character Return\r\n  or the character Space\r\n  or the string \"--\"\r\n  or the string \"/*\"\r\n  or the string \"load\"\r\nAn unhandled error condition has been signalled: At\r\n\r\n\r\n      AFTER LOAD DO\r\n\r\n      ^ (Line 19, Column 4, Position 502)\r\n\r\nIn context COMMANDS:\r\n\r\nWhile parsing COMMANDS. Expected:\r\n\r\n     the character Tab\r\n  or the character Newline\r\n  or the character Return\r\n  or the character Space\r\n  or the string \"--\"\r\n  or the string \"/*\"\r\n  or the string \"load\"\r\n\r\n\r\n\r\n\r\nWhat I am doing here?\r\n\r\nAt\r\n\r\n\r\n      AFTER LOAD DO\r\n\r\n      ^ (Line 19, Column 4, Position 502)\r\n\r\nIn context COMMANDS:\r\n\r\nWhile parsing COMMANDS. Expected:\r\n\r\n     the character Tab\r\n  or the character Newline\r\n  or the character Return\r\n  or the character Space\r\n  or the string \"--\"\r\n  or the string \"/*\"\r\n  or the string \"load\"\r\n```"}}
{"actor":{"display_login":"steffenmllr"}}