Skip to content

Commit d1ae232

Browse files
committed
Fix returning check for Postgres.
1 parent c878a18 commit d1ae232

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

laravel/database/connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function query($sql, $bindings = array())
197197
// For insert statements that use the "returning" clause, which is allowed
198198
// by database systems such as Postgres, we need to actually return the
199199
// real query result so the consumer can get the ID.
200-
elseif (stripos($sql, 'insert') === 0 and stripos($sql, 'returning') !== false)
200+
elseif (stripos($sql, 'insert') === 0 and stripos($sql, ') returning') !== false)
201201
{
202202
return $this->fetch($statement, Config::get('database.fetch'));
203203
}

0 commit comments

Comments
 (0)