{"action":"created","issue":{"url":"https://api.github.com/repos/MagicStack/asyncpg/issues/72","repository_url":"https://api.github.com/repos/MagicStack/asyncpg","labels_url":"https://api.github.com/repos/MagicStack/asyncpg/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/MagicStack/asyncpg/issues/72/comments","events_url":"https://api.github.com/repos/MagicStack/asyncpg/issues/72/events","html_url":"https://github.com/MagicStack/asyncpg/issues/72","id":204756978,"number":72,"title":"issue with custom data types between schemas on same connection","user":{"login":"defg","id":238969,"avatar_url":"https://avatars.githubusercontent.com/u/238969?v=3","gravatar_id":"","url":"https://api.github.com/users/defg","html_url":"https://github.com/defg","followers_url":"https://api.github.com/users/defg/followers","following_url":"https://api.github.com/users/defg/following{/other_user}","gists_url":"https://api.github.com/users/defg/gists{/gist_id}","starred_url":"https://api.github.com/users/defg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defg/subscriptions","organizations_url":"https://api.github.com/users/defg/orgs","repos_url":"https://api.github.com/users/defg/repos","events_url":"https://api.github.com/users/defg/events{/privacy}","received_events_url":"https://api.github.com/users/defg/received_events","type":"User","site_admin":false},"labels":[{"id":410393387,"url":"https://api.github.com/repos/MagicStack/asyncpg/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"elprans","id":347119,"avatar_url":"https://avatars.githubusercontent.com/u/347119?v=3","gravatar_id":"","url":"https://api.github.com/users/elprans","html_url":"https://github.com/elprans","followers_url":"https://api.github.com/users/elprans/followers","following_url":"https://api.github.com/users/elprans/following{/other_user}","gists_url":"https://api.github.com/users/elprans/gists{/gist_id}","starred_url":"https://api.github.com/users/elprans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elprans/subscriptions","organizations_url":"https://api.github.com/users/elprans/orgs","repos_url":"https://api.github.com/users/elprans/repos","events_url":"https://api.github.com/users/elprans/events{/privacy}","received_events_url":"https://api.github.com/users/elprans/received_events","type":"User","site_admin":false},"assignees":[{"login":"elprans","id":347119,"avatar_url":"https://avatars.githubusercontent.com/u/347119?v=3","gravatar_id":"","url":"https://api.github.com/users/elprans","html_url":"https://github.com/elprans","followers_url":"https://api.github.com/users/elprans/followers","following_url":"https://api.github.com/users/elprans/following{/other_user}","gists_url":"https://api.github.com/users/elprans/gists{/gist_id}","starred_url":"https://api.github.com/users/elprans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elprans/subscriptions","organizations_url":"https://api.github.com/users/elprans/orgs","repos_url":"https://api.github.com/users/elprans/repos","events_url":"https://api.github.com/users/elprans/events{/privacy}","received_events_url":"https://api.github.com/users/elprans/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-02-02T01:24:18Z","updated_at":"2017-02-03T02:23:02Z","closed_at":null,"body":"<!--\r\nThanks for wanting to report an issue you've found in asyncpg. Please fill in\r\nthe template below.\r\n\r\nIt will be much easier for us to fix the issue if a test case that reproduces\r\nthe problem is provided, with clear instructions on how to run it.\r\n\r\nThank you!\r\n-->\r\n\r\n* **asyncpg version**: 0.8.4\r\n* **PostgreSQL version**: PostgreSQL 9.6.0\r\n* **Python version**: Python 3.5.2 \r\n* **Platform**: Ubuntu 14.04.2 LTS\r\n* **Do you use pgbouncer?**: No\r\n* **Do you use the wheel package or built locally\r\n  (if locally, which version of Cython was used)?**: pypi pip pkg\r\n* **Can you the issue be reproduced when running under\r\n  [uvloop](https://github.com/magicstack/uvloop)?**: Yes\r\n\r\n<!-- Enter your issue details below this comment. -->\r\nI'm receiving the exception \r\n\"asyncpg.exceptions.FeatureNotSupportedError: cached plan must not change result type\"\r\nwhen I try to use a custom enum type across 2 schemas in the same connection. This happens even when I'm using independent transactions. This behavior doesn't happen when I issue the SQL in postgres directly.\r\n\r\nI've written a sample python script along with some SQL to reproduce the issue.\r\n\r\nhttps://gist.github.com/defg/8fd9e97efd1ba5195052a0faa1457dcc\r\n\r\nMaybe something is cached w/o regard for the schema?\r\n\r\nI'm working around this issue for the time being by making a connection per schema, but it would be much easier in the future if I could access different schemas on the same connection w/o error.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MagicStack/asyncpg/issues/comments/277147351","html_url":"https://github.com/MagicStack/asyncpg/issues/72#issuecomment-277147351","issue_url":"https://api.github.com/repos/MagicStack/asyncpg/issues/72","id":277147351,"user":{"login":"elprans","id":347119,"avatar_url":"https://avatars.githubusercontent.com/u/347119?v=3","gravatar_id":"","url":"https://api.github.com/users/elprans","html_url":"https://github.com/elprans","followers_url":"https://api.github.com/users/elprans/followers","following_url":"https://api.github.com/users/elprans/following{/other_user}","gists_url":"https://api.github.com/users/elprans/gists{/gist_id}","starred_url":"https://api.github.com/users/elprans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elprans/subscriptions","organizations_url":"https://api.github.com/users/elprans/orgs","repos_url":"https://api.github.com/users/elprans/repos","events_url":"https://api.github.com/users/elprans/events{/privacy}","received_events_url":"https://api.github.com/users/elprans/received_events","type":"User","site_admin":false},"created_at":"2017-02-03T02:23:02Z","updated_at":"2017-02-03T02:23:02Z","body":"Actually, the documentation states the following:\r\n\r\n> Although the main point of a prepared statement is to avoid repeated parse analysis and planning of the statement, PostgreSQL will force re-analysis and re-planning of the statement before using it whenever database objects used in the statement have undergone definitional (DDL) changes since the previous use of the prepared statement. Also, if the value of search_path changes from one use to the next, the statement will be re-parsed using the new search_path. (This latter behavior is new as of PostgreSQL 9.3.)\r\n\r\nWhich makes this error a bit odd, as prepared statement submission should survive both the schema change and DDL.  I'll need to look into this more."}}
{"actor":{"display_login":"elprans"}}