{"action":"created","issue":{"url":"https://api.github.com/repos/ericmj/postgrex/issues/84","labels_url":"https://api.github.com/repos/ericmj/postgrex/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/ericmj/postgrex/issues/84/comments","events_url":"https://api.github.com/repos/ericmj/postgrex/issues/84/events","html_url":"https://github.com/ericmj/postgrex/pull/84","id":91776776,"number":84,"title":"Improved support of hstore for case when hstore extension is created inside a PG schema","user":{"login":"romul","id":28540,"avatar_url":"https://avatars.githubusercontent.com/u/28540?v=3","gravatar_id":"","url":"https://api.github.com/users/romul","html_url":"https://github.com/romul","followers_url":"https://api.github.com/users/romul/followers","following_url":"https://api.github.com/users/romul/following{/other_user}","gists_url":"https://api.github.com/users/romul/gists{/gist_id}","starred_url":"https://api.github.com/users/romul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romul/subscriptions","organizations_url":"https://api.github.com/users/romul/orgs","repos_url":"https://api.github.com/users/romul/repos","events_url":"https://api.github.com/users/romul/events{/privacy}","received_events_url":"https://api.github.com/users/romul/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-29T11:18:59Z","updated_at":"2015-06-29T20:51:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ericmj/postgrex/pulls/84","html_url":"https://github.com/ericmj/postgrex/pull/84","diff_url":"https://github.com/ericmj/postgrex/pull/84.diff","patch_url":"https://github.com/ericmj/postgrex/pull/84.patch"},"body":"I've tried to remove schema prefix for TypeInfo fields in Types.build_types/1. But it looks like a strange hack and could lead to side-effects besides.\r\nAnd in any case it won't be enough.\r\nTypes are preloaded with Types.bootstrap_query/2, which also use send matchers in SQL query like \r\n``` sql\r\nSELECT t.oid, t.typname, t.typsend, t.typreceive, t.typoutput, t.typinput,\r\n       t.typelem, coalesce(r.rngsubtype, 0), ARRAY (\r\n  SELECT a.atttypid\r\n  FROM pg_attribute AS a\r\n  WHERE a.attrelid = t.typrelid AND a.attnum > 0 AND NOT a.attisdropped\r\n  ORDER BY a.attnum\r\n)\r\nFROM pg_type AS t\r\nLEFT JOIN pg_range AS r ON r.rngtypid = t.oid\r\nWHERE\r\n  t.typname::text = ANY ((ARRAY[])::text[]) OR\r\n  t.typsend::text = ANY ((ARRAY['array_send', 'range_send', 'record_send', 'cidsend', 'xidsend', 'regtypesend', 'regclasssend', 'regoperatorsend', 'regopersend', 'regproceduresend', 'regprocsend', 'oidsend', 'hstore_send', 'unknownsend', 'tidsend', 'enum_send', 'interval_send', 'timestamptz_send', 'timestamp_send', 'timetz_send', 'time_send', 'date_send', 'uuid_send', 'numeric_send', 'float8send', 'float4send', 'int8send', 'int4send', 'int2send', 'byteasend', 'varcharsend', 'citextsend', 'textsend', 'bpcharsend', 'boolsend', 'void_send'])::text[]) OR\r\n  t.typreceive::text = ANY ((ARRAY[])::text[]) OR\r\n  t.typoutput::text = ANY ((ARRAY[])::text[]) OR\r\n  t.typinput::text = ANY ((ARRAY[])::text[])\r\n``` \r\n\r\nI think, we should admit, that hstore could not be matched by typsend, else we will end up with ugly hacks like removing schema from t.typsend::text directly in SQL.\r\nThis pull request eliminates need in writing own Postgrex extension for custom hstore."},"comment":{"url":"https://api.github.com/repos/ericmj/postgrex/issues/comments/116843365","html_url":"https://github.com/ericmj/postgrex/pull/84#issuecomment-116843365","issue_url":"https://api.github.com/repos/ericmj/postgrex/issues/84","id":116843365,"user":{"login":"ericmj","id":316890,"avatar_url":"https://avatars.githubusercontent.com/u/316890?v=3","gravatar_id":"","url":"https://api.github.com/users/ericmj","html_url":"https://github.com/ericmj","followers_url":"https://api.github.com/users/ericmj/followers","following_url":"https://api.github.com/users/ericmj/following{/other_user}","gists_url":"https://api.github.com/users/ericmj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericmj/subscriptions","organizations_url":"https://api.github.com/users/ericmj/orgs","repos_url":"https://api.github.com/users/ericmj/repos","events_url":"https://api.github.com/users/ericmj/events{/privacy}","received_events_url":"https://api.github.com/users/ericmj/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T20:51:36Z","updated_at":"2015-06-29T20:51:36Z","body":"That's great, will merge after CI passes."}}