{"action":"created","issue":{"url":"https://api.github.com/repos/tpolecat/doobie/issues/94","labels_url":"https://api.github.com/repos/tpolecat/doobie/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/tpolecat/doobie/issues/94/comments","events_url":"https://api.github.com/repos/tpolecat/doobie/issues/94/events","html_url":"https://github.com/tpolecat/doobie/issues/94","id":57697572,"number":94,"title":"Support (or sugar? or nothing?) for PostgreSQL's composite types","user":{"login":"icassina","id":923977,"avatar_url":"https://avatars.githubusercontent.com/u/923977?v=3","gravatar_id":"","url":"https://api.github.com/users/icassina","html_url":"https://github.com/icassina","followers_url":"https://api.github.com/users/icassina/followers","following_url":"https://api.github.com/users/icassina/following{/other_user}","gists_url":"https://api.github.com/users/icassina/gists{/gist_id}","starred_url":"https://api.github.com/users/icassina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icassina/subscriptions","organizations_url":"https://api.github.com/users/icassina/orgs","repos_url":"https://api.github.com/users/icassina/repos","events_url":"https://api.github.com/users/icassina/events{/privacy}","received_events_url":"https://api.github.com/users/icassina/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-14T16:12:13Z","updated_at":"2015-02-14T16:17:22Z","closed_at":null,"body":"PostgreSQL supports user-defined types.\r\n\r\nType creation is easily done with:\r\n```\r\nCREATE TYPE Point2D AS (x NUMERIC, y NUMERIC);\r\n```\r\n\r\nValue construction is done using 'ROW':\r\n```\r\nSELECT (ROW(10, 22.2) :: Point2D) AS point \r\n```\r\n\r\nValue deconstruction is done using '.':\r\n```\r\nSELECT (ROW(10, 22.2) :: Point2D).x\r\n```"},"comment":{"url":"https://api.github.com/repos/tpolecat/doobie/issues/comments/74381003","html_url":"https://github.com/tpolecat/doobie/issues/94#issuecomment-74381003","issue_url":"https://api.github.com/repos/tpolecat/doobie/issues/94","id":74381003,"user":{"login":"icassina","id":923977,"avatar_url":"https://avatars.githubusercontent.com/u/923977?v=3","gravatar_id":"","url":"https://api.github.com/users/icassina","html_url":"https://github.com/icassina","followers_url":"https://api.github.com/users/icassina/followers","following_url":"https://api.github.com/users/icassina/following{/other_user}","gists_url":"https://api.github.com/users/icassina/gists{/gist_id}","starred_url":"https://api.github.com/users/icassina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icassina/subscriptions","organizations_url":"https://api.github.com/users/icassina/orgs","repos_url":"https://api.github.com/users/icassina/repos","events_url":"https://api.github.com/users/icassina/events{/privacy}","received_events_url":"https://api.github.com/users/icassina/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T16:17:22Z","updated_at":"2015-02-14T16:17:22Z","body":"Enumeration would be very nice too:\r\n\r\nType creation:\r\n```\r\nCREATE Trool AS ENUM ('True', 'False', 'DontCare');\r\n```\r\n\r\nValue construction is nobrain:\r\n```\r\nSELECT ('True' :: Trool)\r\n```\r\n\r\nBut value must be valid:\r\n\r\n```\r\nSELECT ('Bad' :: Trool)\r\n```\r\n> ERROR:  invalid input value for enum trool: \"Bad\"\r\n> LINE 1: SELECT 'Bad'::Trool;\r\n"}}