{"action":"created","issue":{"url":"https://api.github.com/repos/pramsey/pgsql-ogr-fdw/issues/74","repository_url":"https://api.github.com/repos/pramsey/pgsql-ogr-fdw","labels_url":"https://api.github.com/repos/pramsey/pgsql-ogr-fdw/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/pramsey/pgsql-ogr-fdw/issues/74/comments","events_url":"https://api.github.com/repos/pramsey/pgsql-ogr-fdw/issues/74/events","html_url":"https://github.com/pramsey/pgsql-ogr-fdw/issues/74","id":150686295,"number":74,"title":"ERROR:  FDW table includes more geometry columns than exist in the OGR source regression failure","user":{"login":"robe2","id":4734450,"avatar_url":"https://avatars.githubusercontent.com/u/4734450?v=3","gravatar_id":"","url":"https://api.github.com/users/robe2","html_url":"https://github.com/robe2","followers_url":"https://api.github.com/users/robe2/followers","following_url":"https://api.github.com/users/robe2/following{/other_user}","gists_url":"https://api.github.com/users/robe2/gists{/gist_id}","starred_url":"https://api.github.com/users/robe2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robe2/subscriptions","organizations_url":"https://api.github.com/users/robe2/orgs","repos_url":"https://api.github.com/users/robe2/repos","events_url":"https://api.github.com/users/robe2/events{/privacy}","received_events_url":"https://api.github.com/users/robe2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-24T18:15:26Z","updated_at":"2016-04-25T16:44:27Z","closed_at":null,"body":"I'm having a bunch of regressions using ODBC data sources.  Here is one of them.\r\n\r\n```\r\nCREATE SERVER northwind\r\n  FOREIGN DATA WRAPPER ogr_fdw\r\n  OPTIONS (\r\n    datasource 'C:/fdw_data/northwind.mdb',\r\n    format 'ODBC' );\r\n\r\nIMPORT FOREIGN SCHEMA ogr_all FROM SERVER northwind INTO public;\r\n\r\n````\r\n\r\nWorks fine.  But when I go to categories table, which happens to have bytea (which is an MS Access Picture blob)\r\n\r\n```\r\n\r\nSELECT * FROM categories;\r\n\r\n```\r\n\r\n>  ERROR: FDW table includes more geometry columns than exist in the OGR source\r\nSQL state: XX000\r\n\r\nThis used to work in ogr_fdw 1.0.1.  I'll retest on my 9.5 newer build just to confirm it's not a 9.6 issue (I have more serious issues with ODBC issue , which might have to do with the config options stuff.  Those I'm investigating.\r\n\r\nBoth ogr_fdw 1.0.1 and master generate the same foreign table structure for categories which looks like:\r\n\r\n```\r\n\r\nCREATE FOREIGN TABLE public.categories\r\n   (fid integer ,\r\n    geom bytea ,\r\n    categoryid integer ,\r\n    categoryname character varying ,\r\n    description character varying ,\r\n    picture bytea )\r\n   SERVER northwind\r\n   OPTIONS (layer 'Categories');\r\n\r\n```\r\n\r\nSo must be in the reading where it goes south.\r\n\r\nI tested with and without loading postgis.  Only difference is that geom comes in as geometry instead of bytea (as expected).  Still same error though.\r\n"},"comment":{"url":"https://api.github.com/repos/pramsey/pgsql-ogr-fdw/issues/comments/214436040","html_url":"https://github.com/pramsey/pgsql-ogr-fdw/issues/74#issuecomment-214436040","issue_url":"https://api.github.com/repos/pramsey/pgsql-ogr-fdw/issues/74","id":214436040,"user":{"login":"robe2","id":4734450,"avatar_url":"https://avatars.githubusercontent.com/u/4734450?v=3","gravatar_id":"","url":"https://api.github.com/users/robe2","html_url":"https://github.com/robe2","followers_url":"https://api.github.com/users/robe2/followers","following_url":"https://api.github.com/users/robe2/following{/other_user}","gists_url":"https://api.github.com/users/robe2/gists{/gist_id}","starred_url":"https://api.github.com/users/robe2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robe2/subscriptions","organizations_url":"https://api.github.com/users/robe2/orgs","repos_url":"https://api.github.com/users/robe2/repos","events_url":"https://api.github.com/users/robe2/events{/privacy}","received_events_url":"https://api.github.com/users/robe2/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T16:44:27Z","updated_at":"2016-04-25T16:44:27Z","body":"I'm pretty sure I had code in IMPORT FOREIGN SCHEMA logic to use bytea if postgis was found to not be installed.  @pramsey  must have taken that logic out."}}