{"action":"opened","issue":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1349","repository_url":"https://api.github.com/repos/greenplum-db/gpdb","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1349/labels{/name}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1349/comments","events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1349/events","html_url":"https://github.com/greenplum-db/gpdb/issues/1349","id":190388390,"number":1349,"title":"Common Table Expression evaluated twice","user":{"login":"hlinnaka","id":191602,"avatar_url":"https://avatars.githubusercontent.com/u/191602?v=3","gravatar_id":"","url":"https://api.github.com/users/hlinnaka","html_url":"https://github.com/hlinnaka","followers_url":"https://api.github.com/users/hlinnaka/followers","following_url":"https://api.github.com/users/hlinnaka/following{/other_user}","gists_url":"https://api.github.com/users/hlinnaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hlinnaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlinnaka/subscriptions","organizations_url":"https://api.github.com/users/hlinnaka/orgs","repos_url":"https://api.github.com/users/hlinnaka/repos","events_url":"https://api.github.com/users/hlinnaka/events{/privacy}","received_events_url":"https://api.github.com/users/hlinnaka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-18T18:25:46Z","updated_at":"2016-11-18T18:25:46Z","closed_at":null,"body":"This regression test case from PostgreSQL 8.4 returns incorrect results on GPDB:\r\n\r\n```\r\n-- Multiple uses are evaluated only once\r\nSELECT count(*) FROM (\r\n  WITH q1(x) AS (SELECT random() FROM generate_series(1, 5))\r\n    SELECT * FROM q1\r\n  UNION\r\n    SELECT * FROM q1\r\n) ss;\r\n count \r\n-------\r\n     5\r\n(1 row)\r\n```\r\n\r\n\"5\" is the correct answer, from the upstream expected output, but GPDB returns \"10\"."}}
{"actor":{"display_login":"hlinnaka"}}