EllisLab/CodeIgniter — pull request #2658 by waitingsong (2013-09-24 07:13:12+00:00)
Title: Feature v2 postgres compatible

changes for compatible to Postgresql.
main change is support postgres SQL statement end with 'RERURNING' instead of insert_id();
usage:
db->query("INSER INTO tbl VALUSE (...) RERURNING id");
// OR $stmt = $this->db->insert_returning($tbl, $data, 'id');
if ($stmt->num_rows())
{
$newid = (int) $stmt->row()->project_id;
}
else
{
$newid = FALSE;
}
?>