Skip to content

Instantly share code, notes, and snippets.

@kuwa72
Created April 14, 2013 03:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuwa72/5381320 to your computer and use it in GitHub Desktop.
Save kuwa72/5381320 to your computer and use it in GitHub Desktop.
Posgres driver fix 'fetch_version' and 'pg_error' for CodeIgniter 2.1.3
161c161,164
< return "SELECT version() AS ver";
---
> $version = @pg_fetch_array(@pg_query($this->conn_id, "SELECT version() AS ver"));
> $version_array = explode(" ", $version['ver']);
> $version_array['server'] = $version_array[1];
> return $version_array;
700a704,706
> function pg_error() {
> pg_last_error();
> }
703c709
< /* Location: ./system/database/drivers/postgre/postgre_driver.php */
\ No newline at end of file
---
> /* Location: ./system/database/drivers/postgre/postgre_driver.php *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment