{"action":"created","issue":{"url":"https://api.github.com/repos/dimitri/pgloader/issues/309","labels_url":"https://api.github.com/repos/dimitri/pgloader/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/dimitri/pgloader/issues/309/comments","events_url":"https://api.github.com/repos/dimitri/pgloader/issues/309/events","html_url":"https://github.com/dimitri/pgloader/issues/309","id":117560758,"number":309,"title":"MSSQL -> Postgres Database error 42P01: relation does not exist","user":{"login":"davidweterings","id":1713608,"avatar_url":"https://avatars.githubusercontent.com/u/1713608?v=3","gravatar_id":"","url":"https://api.github.com/users/davidweterings","html_url":"https://github.com/davidweterings","followers_url":"https://api.github.com/users/davidweterings/followers","following_url":"https://api.github.com/users/davidweterings/following{/other_user}","gists_url":"https://api.github.com/users/davidweterings/gists{/gist_id}","starred_url":"https://api.github.com/users/davidweterings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidweterings/subscriptions","organizations_url":"https://api.github.com/users/davidweterings/orgs","repos_url":"https://api.github.com/users/davidweterings/repos","events_url":"https://api.github.com/users/davidweterings/events{/privacy}","received_events_url":"https://api.github.com/users/davidweterings/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-18T10:43:22Z","updated_at":"2015-11-18T10:55:13Z","closed_at":null,"body":"I'm trying to convert a large MSSQL database to postgresql, as an experiment I first tried converting the following simple database: https://gist.github.com/davidweterings/46a01a05c6dba36f4ef4 \r\nwith the command:\r\n./pgloader mssql://user details@mssqldb:1433/test postgresql://user details@localhost/loyalty\r\n\r\nMy assumption is that this command would handle stuff like foreign keys without anything extra (please correct me if I'm wrong).\r\n\r\nIt fails with a \"FATAL We have a situation here\" and just before that a \"ERROR Database error 42P01: relation \"dbo.card\" does not exist\" but does create the schema, the tables and inserts the data. It fails to create the foreign keys. The output with -v --debug can be found here:\r\n>https://gist.github.com/davidweterings/d6dd8e6dc3ef6f04c1bc\r\n\r\nRunning on Mac OSX 10.10.5 (16gb) with pgloader version build a few days ago:\r\n>pgloader version \"3.2.da05782\"\r\n>compiled with SBCL 1.2.15"},"comment":{"url":"https://api.github.com/repos/dimitri/pgloader/issues/comments/157678140","html_url":"https://github.com/dimitri/pgloader/issues/309#issuecomment-157678140","issue_url":"https://api.github.com/repos/dimitri/pgloader/issues/309","id":157678140,"user":{"login":"dimitri","id":102900,"avatar_url":"https://avatars.githubusercontent.com/u/102900?v=3","gravatar_id":"","url":"https://api.github.com/users/dimitri","html_url":"https://github.com/dimitri","followers_url":"https://api.github.com/users/dimitri/followers","following_url":"https://api.github.com/users/dimitri/following{/other_user}","gists_url":"https://api.github.com/users/dimitri/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitri/subscriptions","organizations_url":"https://api.github.com/users/dimitri/orgs","repos_url":"https://api.github.com/users/dimitri/repos","events_url":"https://api.github.com/users/dimitri/events{/privacy}","received_events_url":"https://api.github.com/users/dimitri/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T10:55:13Z","updated_at":"2015-11-18T10:55:13Z","body":"It is failing in the last step (*reset sequences*), so you can tweak it to bypass that and it should stop failing. There's apparently a problem with quoting of the table names in your case, I will see about that.\r\n\r\n    pgloader --with 'reset no sequences' ..."}}