summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-09-20 14:58:33 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-09-20 15:19:49 +0200
commitdf0696a066e68ca020f9b12fbeff3a4d28341889 (patch)
tree4b590a521747190e21cc1a460a55051c7f046d0c /system/database/drivers/postgre
parent731dbac7d399928f4e1137031689796b0721c75e (diff)
postgres: Fix CI's postgres version detection
This broke insert_id() because it expects a 'server' key in the returned array yet no array is returned. This should work just fine for postgres >7.4 now. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 2b1d53953..c9365fdb1 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -158,7 +158,8 @@ class CI_DB_postgre_driver extends CI_DB {
*/
function _version()
{
- return "SELECT version() AS ver";
+ $pg_version = pg_version($this->conn_id);
+ return $pg_version;
}
// --------------------------------------------------------------------