{"action":"opened","issue":{"url":"https://api.github.com/repos/AlexTatiyants/pev/issues/3","labels_url":"https://api.github.com/repos/AlexTatiyants/pev/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/AlexTatiyants/pev/issues/3/comments","events_url":"https://api.github.com/repos/AlexTatiyants/pev/issues/3/events","html_url":"https://github.com/AlexTatiyants/pev/issues/3","id":128412897,"number":3,"title":"HStore query plans causing javascript errors","user":{"login":"jiaaro","id":232593,"avatar_url":"https://avatars.githubusercontent.com/u/232593?v=3","gravatar_id":"","url":"https://api.github.com/users/jiaaro","html_url":"https://github.com/jiaaro","followers_url":"https://api.github.com/users/jiaaro/followers","following_url":"https://api.github.com/users/jiaaro/following{/other_user}","gists_url":"https://api.github.com/users/jiaaro/gists{/gist_id}","starred_url":"https://api.github.com/users/jiaaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiaaro/subscriptions","organizations_url":"https://api.github.com/users/jiaaro/orgs","repos_url":"https://api.github.com/users/jiaaro/repos","events_url":"https://api.github.com/users/jiaaro/events{/privacy}","received_events_url":"https://api.github.com/users/jiaaro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-24T17:42:18Z","updated_at":"2016-01-24T17:42:18Z","closed_at":null,"body":"I'm not completely sure the issue, but here's the error, plan and query.\r\n\r\n![screen shot 2016-01-24 at 12 41 25 pm](https://cloud.githubusercontent.com/assets/232593/12537845/d3f82c98-c297-11e5-9693-63fc2ce86bb0.png)\r\n\r\njavascript error:\r\n```\r\nEXCEPTION: ReferenceError: Can't find variable: Intl in [{{plan.planStats.maxRows | number:'.0-2'}} in a@62:40]\r\nlogErrorangular2.min.js:16:25229\r\nlogGroupangular2.min.js:16:25399\r\ncallangular2.min.js:1:16625\r\n(anonymous function)angular2.min.js:10:14863\r\n_notifyOnErrorangular2.min.js:3:16080\r\nonErrorangular2.min.js:3:14376\r\nrunangular2-polyfills.js:140\r\n(anonymous function)angular2.min.js:3:14662\r\nrunangular2.min.js:3:14080\r\n(anonymous function)angular2.min.js:10:16100\r\n(anonymous function)angular2.min.js:10:5039\r\ntRx.min.js:1:475\r\nnextRx.min.js:5:20153\r\n_nextRx.min.js:5:29504\r\nnextRx.min.js:5:28974\r\nemitangular2.min.js:10:4754\r\n(anonymous function)angular2.min.js:3:12874\r\nrunangular2-polyfills.js:137\r\n_notifyOnTurnDoneangular2.min.js:3:12822\r\n(anonymous function)angular2.min.js:3:14846\r\nzoneBoundFnangular2-polyfills.js:110\r\nlib$es6$promise$asap$$flushangular2-polyfills.js:1304\r\n```\r\n\r\nand\r\n```\r\nORIGINAL EXCEPTION: ReferenceError: Can't find variable: Intl\r\nlogErrorangular2.min.js:16:25229\r\ncallangular2.min.js:1:16870\r\n(anonymous function)angular2.min.js:10:14863\r\n_notifyOnErrorangular2.min.js:3:16080\r\nonErrorangular2.min.js:3:14376\r\nrunangular2-polyfills.js:140\r\n(anonymous function)angular2.min.js:3:14662\r\nrunangular2.min.js:3:14080\r\n(anonymous function)angular2.min.js:10:16100\r\n(anonymous function)angular2.min.js:10:5039\r\ntRx.min.js:1:475\r\nnextRx.min.js:5:20153\r\n_nextRx.min.js:5:29504\r\nnextRx.min.js:5:28974\r\nemitangular2.min.js:10:4754\r\n(anonymous function)angular2.min.js:3:12874\r\nrunangular2-polyfills.js:137\r\n_notifyOnTurnDoneangular2.min.js:3:12822\r\n(anonymous function)angular2.min.js:3:14846\r\nzoneBoundFnangular2-polyfills.js:110\r\nlib$es6$promise$asap$$flushangular2-polyfills.js:1304\r\n```\r\n\r\nplan:\r\n```json\r\n[\r\n  {\r\n    \"Plan\": {\r\n      \"Node Type\": \"Aggregate\",\r\n      \"Strategy\": \"Hashed\",\r\n      \"Startup Cost\": 2452.01,\r\n      \"Total Cost\": 2452.01,\r\n      \"Plan Rows\": 1,\r\n      \"Plan Width\": 401,\r\n      \"Actual Startup Time\": 13063.395,\r\n      \"Actual Total Time\": 13063.396,\r\n      \"Actual Rows\": 2,\r\n      \"Actual Loops\": 1,\r\n      \"Output\": [\"((hs_data -> 'stateunion_spen'::text))\", \"count(((hs_data -> 'stateunion_spen'::text)))\"],\r\n      \"Shared Hit Blocks\": 6316,\r\n      \"Shared Read Blocks\": 3543,\r\n      \"Shared Dirtied Blocks\": 0,\r\n      \"Shared Written Blocks\": 0,\r\n      \"Local Hit Blocks\": 0,\r\n      \"Local Read Blocks\": 0,\r\n      \"Local Dirtied Blocks\": 0,\r\n      \"Local Written Blocks\": 0,\r\n      \"Temp Read Blocks\": 0,\r\n      \"Temp Written Blocks\": 0,\r\n      \"I/O Read Time\": 12910.745,\r\n      \"I/O Write Time\": 0.000,\r\n      \"Plans\": [\r\n        {\r\n          \"Node Type\": \"Bitmap Heap Scan\",\r\n          \"Parent Relationship\": \"Outer\",\r\n          \"Relation Name\": \"stitcher_participant\",\r\n          \"Schema\": \"public\",\r\n          \"Alias\": \"stitcher_participant\",\r\n          \"Startup Cost\": 2448.00,\r\n          \"Total Cost\": 2452.01,\r\n          \"Plan Rows\": 1,\r\n          \"Plan Width\": 401,\r\n          \"Actual Startup Time\": 12663.894,\r\n          \"Actual Total Time\": 13063.179,\r\n          \"Actual Rows\": 220,\r\n          \"Actual Loops\": 1,\r\n          \"Output\": [\"(hs_data -> 'stateunion_spen'::text)\", \"hs_data\"],\r\n          \"Recheck Cond\": \"(((stitcher_participant.hs_data ? 'stateunionen_qx'::text) AND (stitcher_participant.hs_data ? 'source'::text)) OR ((stitcher_participant.hs_data ? 'stateunionsp_qx'::text) AND (stitcher_participant.hs_data ? 'source'::text)))\",\r\n          \"Rows Removed by Index Recheck\": 0,\r\n          \"Filter\": \"((stitcher_participant.hs_data -> 'source'::text) = 'fulcrum'::text)\",\r\n          \"Rows Removed by Filter\": 7,\r\n          \"Shared Hit Blocks\": 6316,\r\n          \"Shared Read Blocks\": 3543,\r\n          \"Shared Dirtied Blocks\": 0,\r\n          \"Shared Written Blocks\": 0,\r\n          \"Local Hit Blocks\": 0,\r\n          \"Local Read Blocks\": 0,\r\n          \"Local Dirtied Blocks\": 0,\r\n          \"Local Written Blocks\": 0,\r\n          \"Temp Read Blocks\": 0,\r\n          \"Temp Written Blocks\": 0,\r\n          \"I/O Read Time\": 12910.745,\r\n          \"I/O Write Time\": 0.000,\r\n          \"Plans\": [\r\n            {\r\n              \"Node Type\": \"BitmapOr\",\r\n              \"Parent Relationship\": \"Outer\",\r\n              \"Startup Cost\": 2448.00,\r\n              \"Total Cost\": 2448.00,\r\n              \"Plan Rows\": 2,\r\n              \"Plan Width\": 0,\r\n              \"Actual Startup Time\": 12662.974,\r\n              \"Actual Total Time\": 12662.974,\r\n              \"Actual Rows\": 0,\r\n              \"Actual Loops\": 1,\r\n              \"Shared Hit Blocks\": 4663,\r\n              \"Shared Read Blocks\": 3181,\r\n              \"Shared Dirtied Blocks\": 0,\r\n              \"Shared Written Blocks\": 0,\r\n              \"Local Hit Blocks\": 0,\r\n              \"Local Read Blocks\": 0,\r\n              \"Local Dirtied Blocks\": 0,\r\n              \"Local Written Blocks\": 0,\r\n              \"Temp Read Blocks\": 0,\r\n              \"Temp Written Blocks\": 0,\r\n              \"I/O Read Time\": 12517.499,\r\n              \"I/O Write Time\": 0.000,\r\n              \"Plans\": [\r\n                {\r\n                  \"Node Type\": \"Bitmap Index Scan\",\r\n                  \"Parent Relationship\": \"Member\",\r\n                  \"Index Name\": \"ix_participant_hs_object\",\r\n                  \"Startup Cost\": 0.00,\r\n                  \"Total Cost\": 1224.00,\r\n                  \"Plan Rows\": 1,\r\n                  \"Plan Width\": 0,\r\n                  \"Actual Startup Time\": 12597.632,\r\n                  \"Actual Total Time\": 12597.632,\r\n                  \"Actual Rows\": 182,\r\n                  \"Actual Loops\": 1,\r\n                  \"Index Cond\": \"((stitcher_participant.hs_data ? 'stateunionen_qx'::text) AND (stitcher_participant.hs_data ? 'source'::text))\",\r\n                  \"Shared Hit Blocks\": 742,\r\n                  \"Shared Read Blocks\": 3179,\r\n                  \"Shared Dirtied Blocks\": 0,\r\n                  \"Shared Written Blocks\": 0,\r\n                  \"Local Hit Blocks\": 0,\r\n                  \"Local Read Blocks\": 0,\r\n                  \"Local Dirtied Blocks\": 0,\r\n                  \"Local Written Blocks\": 0,\r\n                  \"Temp Read Blocks\": 0,\r\n                  \"Temp Written Blocks\": 0,\r\n                  \"I/O Read Time\": 12515.951,\r\n                  \"I/O Write Time\": 0.000\r\n                },\r\n                {\r\n                  \"Node Type\": \"Bitmap Index Scan\",\r\n                  \"Parent Relationship\": \"Member\",\r\n                  \"Index Name\": \"ix_participant_hs_object\",\r\n                  \"Startup Cost\": 0.00,\r\n                  \"Total Cost\": 1224.00,\r\n                  \"Plan Rows\": 1,\r\n                  \"Plan Width\": 0,\r\n                  \"Actual Startup Time\": 65.337,\r\n                  \"Actual Total Time\": 65.337,\r\n                  \"Actual Rows\": 47,\r\n                  \"Actual Loops\": 1,\r\n                  \"Index Cond\": \"((stitcher_participant.hs_data ? 'stateunionsp_qx'::text) AND (stitcher_participant.hs_data ? 'source'::text))\",\r\n                  \"Shared Hit Blocks\": 3921,\r\n                  \"Shared Read Blocks\": 2,\r\n                  \"Shared Dirtied Blocks\": 0,\r\n                  \"Shared Written Blocks\": 0,\r\n                  \"Local Hit Blocks\": 0,\r\n                  \"Local Read Blocks\": 0,\r\n                  \"Local Dirtied Blocks\": 0,\r\n                  \"Local Written Blocks\": 0,\r\n                  \"Temp Read Blocks\": 0,\r\n                  \"Temp Written Blocks\": 0,\r\n                  \"I/O Read Time\": 1.548,\r\n                  \"I/O Write Time\": 0.000\r\n                }\r\n              ]\r\n            }\r\n          ]\r\n        }\r\n      ]\r\n    },\r\n    \"Triggers\": [\r\n    ],\r\n    \"Total Runtime\": 13064.309\r\n  }\r\n]\r\n```\r\n\r\nquery:\r\n```sql\r\nSELECT (hs_data->'stateunion_spen') AS \"hscol\", COUNT(stitcher_participant.hs_data->'stateunion_spen') AS \"hscol_count\" FROM \"stitcher_participant\" WHERE (((hs_data?'stateunionen_qx') OR (hs_data?'stateunionsp_qx')) AND ((hs_data?'source') AND  (hs_data->'source') = 'fulcrum')) GROUP BY (hs_data->'stateunion_spen');\r\n```"}}