Commit 667faf43 by irul

bug fix: Remove cheking version for postgresql < 9.0

1 parent e7853e89
...@@ -333,11 +333,11 @@ class CI_DB_postgre_driver extends CI_DB { ...@@ -333,11 +333,11 @@ class CI_DB_postgre_driver extends CI_DB {
$table = func_num_args() > 0 ? func_get_arg(0) : NULL; $table = func_num_args() > 0 ? func_get_arg(0) : NULL;
$column = func_num_args() > 1 ? func_get_arg(1) : NULL; $column = func_num_args() > 1 ? func_get_arg(1) : NULL;
if ($table == NULL && $v >= '8.1') if ($table == NULL)
{ {
$sql='SELECT LASTVAL() as ins_id'; $sql='SELECT LASTVAL() as ins_id';
} }
elseif ($table != NULL && $column != NULL && $v >= '8.0') elseif ($table != NULL && $column != NULL)
{ {
$sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column); $sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column);
$query = $this->query($sql); $query = $this->query($sql);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!