{"action":"created","issue":{"url":"https://api.github.com/repos/franckverrot/holycorn/issues/7","repository_url":"https://api.github.com/repos/franckverrot/holycorn","labels_url":"https://api.github.com/repos/franckverrot/holycorn/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/franckverrot/holycorn/issues/7/comments","events_url":"https://api.github.com/repos/franckverrot/holycorn/issues/7/events","html_url":"https://github.com/franckverrot/holycorn/issues/7","id":193034132,"number":7,"title":"Table definition","user":{"login":"kbrock","id":1930,"avatar_url":"https://avatars.githubusercontent.com/u/1930?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrock","html_url":"https://github.com/kbrock","followers_url":"https://api.github.com/users/kbrock/followers","following_url":"https://api.github.com/users/kbrock/following{/other_user}","gists_url":"https://api.github.com/users/kbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrock/subscriptions","organizations_url":"https://api.github.com/users/kbrock/orgs","repos_url":"https://api.github.com/users/kbrock/repos","events_url":"https://api.github.com/users/kbrock/events{/privacy}","received_events_url":"https://api.github.com/users/kbrock/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-02T04:52:52Z","updated_at":"2016-12-03T18:01:45Z","closed_at":"2016-12-02T13:31:38Z","body":"This is fun stuff.\r\n\r\nFor the following definition:\r\n\r\n```sql\r\nDROP EXTENSION holycorn CASCADE;\r\nCREATE EXTENSION holycorn;\r\nCREATE SERVER holycorn_server FOREIGN DATA WRAPPER holycorn;\r\nCREATE FOREIGN TABLE holytable (some_date timestampz) \\\r\n  SERVER holycorn_server\r\n  OPTIONS (wrapper_path '/tmp/source.rb');\r\n```\r\n\r\nIs there a way for the class defined in `/tmp/source.rb` to know the schema (`some_date timestampz`) of the table?\r\n\r\nI'm under the impression that only the `OPTIONS` are passed (as a hash) to `initialize`.\r\n\r\nthanks"},"comment":{"url":"https://api.github.com/repos/franckverrot/holycorn/issues/comments/264654929","html_url":"https://github.com/franckverrot/holycorn/issues/7#issuecomment-264654929","issue_url":"https://api.github.com/repos/franckverrot/holycorn/issues/7","id":264654929,"user":{"login":"franckverrot","id":108369,"avatar_url":"https://avatars.githubusercontent.com/u/108369?v=3","gravatar_id":"","url":"https://api.github.com/users/franckverrot","html_url":"https://github.com/franckverrot","followers_url":"https://api.github.com/users/franckverrot/followers","following_url":"https://api.github.com/users/franckverrot/following{/other_user}","gists_url":"https://api.github.com/users/franckverrot/gists{/gist_id}","starred_url":"https://api.github.com/users/franckverrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franckverrot/subscriptions","organizations_url":"https://api.github.com/users/franckverrot/orgs","repos_url":"https://api.github.com/users/franckverrot/repos","events_url":"https://api.github.com/users/franckverrot/events{/privacy}","received_events_url":"https://api.github.com/users/franckverrot/received_events","type":"User","site_admin":false},"created_at":"2016-12-03T18:01:45Z","updated_at":"2016-12-03T18:01:45Z","body":"This is actually a very good question, and I've been asked many times so here's an \"official\" answer 😄 \r\n\r\nPG provides `IMPORT FOREIGN SCHEMA` that is essentially a way for it to \"ask\" foreign servers for their table definitions.\r\n\r\nMost `holycorn-pro` users felt the need to get it, and also wanted to encapsulate more information in user mappings. I got both `IMPORT FOREIGN SCHEMA` and `USER MAPPING`s supported there.\r\n\r\nAny cool usage of `holycorn` on your side? 😉 "}}
{"actor":{"display_login":"franckverrot"}}