{"action":"opened","issue":{"url":"https://api.github.com/repos/dimitri/pgloader/issues/158","labels_url":"https://api.github.com/repos/dimitri/pgloader/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/dimitri/pgloader/issues/158/comments","events_url":"https://api.github.com/repos/dimitri/pgloader/issues/158/events","html_url":"https://github.com/dimitri/pgloader/issues/158","id":55305885,"number":158,"title":"Error: There is no applicable method for the generic function","user":{"login":"AdamFerguson","id":793176,"avatar_url":"https://avatars.githubusercontent.com/u/793176?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamFerguson","html_url":"https://github.com/AdamFerguson","followers_url":"https://api.github.com/users/AdamFerguson/followers","following_url":"https://api.github.com/users/AdamFerguson/following{/other_user}","gists_url":"https://api.github.com/users/AdamFerguson/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamFerguson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamFerguson/subscriptions","organizations_url":"https://api.github.com/users/AdamFerguson/orgs","repos_url":"https://api.github.com/users/AdamFerguson/repos","events_url":"https://api.github.com/users/AdamFerguson/events{/privacy}","received_events_url":"https://api.github.com/users/AdamFerguson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-23T17:04:38Z","updated_at":"2015-01-23T17:04:38Z","closed_at":null,"body":"Thanks, looks like a great tool. I'm trying to export an mssql database over to postgres using this .load script:\r\n\r\n```\r\nload database\r\n     from mssql://user:pass@host/db\r\n     into postgresql://user@localhost:5433/db\r\n\r\nset work_mem to '16MB', maintenance_work_mem to '512 MB'\r\n\r\nbefore load do $$ drop schema if exists dbo cascade; $$;\r\n```\r\n\r\nPart of the way through the load it throws the following error:\r\n\r\n```\r\n   There is no applicable method for the generic function\r\n     #<STANDARD-GENERIC-FUNCTION PGLOADER.PGSQL:FORMAT-PGSQL-CREATE-FKEY (1)>\r\n   when called with arguments\r\n     ((\"FK_dbo.Label_dbo.Label_ParentLabelId\"\r\n       . #S(PGLOADER.PGSQL::PGSQL-FKEY\r\n            :NAME \"FK_dbo.Label_dbo.Label_ParentLabelId\"\r\n            :TABLE-NAME \"dbo.label\"\r\n            :COLUMNS (\"ParentLabelId\")\r\n            :FOREIGN-TABLE \"dbo.label\"\r\n            :FOREIGN-COLUMNS (\"Id\")\r\n            :UPDATE-RULE NIL\r\n            :DELETE-RULE NIL))).\r\n```\r\n\r\nThe only thing that jumps out at me about this error is that it seems to be occurring when trying to create a foreign key for a table that references itself. That is `dbo.label` has a column `ParentLabelId` that is a foreign key to `dbo.label`. Could be there's a problem with that?"}}