{"action":"created","issue":{"url":"https://api.github.com/repos/PocketRent/hhvm-pgsql/issues/77","labels_url":"https://api.github.com/repos/PocketRent/hhvm-pgsql/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/PocketRent/hhvm-pgsql/issues/77/comments","events_url":"https://api.github.com/repos/PocketRent/hhvm-pgsql/issues/77/events","html_url":"https://github.com/PocketRent/hhvm-pgsql/issues/77","id":63865519,"number":77,"title":"PDO vs pg_fetch_* results mismatch","user":{"login":"Kazanir","id":4731136,"avatar_url":"https://avatars.githubusercontent.com/u/4731136?v=3","gravatar_id":"","url":"https://api.github.com/users/Kazanir","html_url":"https://github.com/Kazanir","followers_url":"https://api.github.com/users/Kazanir/followers","following_url":"https://api.github.com/users/Kazanir/following{/other_user}","gists_url":"https://api.github.com/users/Kazanir/gists{/gist_id}","starred_url":"https://api.github.com/users/Kazanir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kazanir/subscriptions","organizations_url":"https://api.github.com/users/Kazanir/orgs","repos_url":"https://api.github.com/users/Kazanir/repos","events_url":"https://api.github.com/users/Kazanir/events{/privacy}","received_events_url":"https://api.github.com/users/Kazanir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-24T00:32:33Z","updated_at":"2015-06-08T01:01:35Z","closed_at":null,"body":"Drupal does some database settings checking as part of its install process, and it fails a check when using this lib, specifically checking that `SELECT 'encoding'::bytea` is set to \"encoding\". PDO returns a NULL for this query while `pg_fetch_*` functions seem to return the correct value:\r\n\r\n```\r\n$db = new PDO($dsn, 'user', 'pass');\r\nvar_dump($db->query(\"SELECT 'encoding'::bytea AS output;\")->fetch(PDO::FETCH_OBJ)); \r\n// object(stdClass) (1) { [\"output\"] => NULL }\r\n\r\n$conn = pg_connect($dsn);\r\n$result = pg_query($conn, \"SELECT 'encoding'::bytea AS output;\");\r\nvar_dump(pg_fetch_object($result)); \r\n// object(stdClass) (1) { [\"output\"] => string(8) \"encoding\" }\r\n```\r\n\r\nSeems like something is amiss, here!"},"comment":{"url":"https://api.github.com/repos/PocketRent/hhvm-pgsql/issues/comments/109819560","html_url":"https://github.com/PocketRent/hhvm-pgsql/issues/77#issuecomment-109819560","issue_url":"https://api.github.com/repos/PocketRent/hhvm-pgsql/issues/77","id":109819560,"user":{"login":"javacty","id":4278216,"avatar_url":"https://avatars.githubusercontent.com/u/4278216?v=3","gravatar_id":"","url":"https://api.github.com/users/javacty","html_url":"https://github.com/javacty","followers_url":"https://api.github.com/users/javacty/followers","following_url":"https://api.github.com/users/javacty/following{/other_user}","gists_url":"https://api.github.com/users/javacty/gists{/gist_id}","starred_url":"https://api.github.com/users/javacty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javacty/subscriptions","organizations_url":"https://api.github.com/users/javacty/orgs","repos_url":"https://api.github.com/users/javacty/repos","events_url":"https://api.github.com/users/javacty/events{/privacy}","received_events_url":"https://api.github.com/users/javacty/received_events","type":"User","site_admin":false},"created_at":"2015-06-08T01:01:35Z","updated_at":"2015-06-08T01:01:35Z","body":"I have the same problem ."}}