Skip to content

Commit

Permalink
Support for CTE in postgreSQL, bcosca/fatfree#1107, bcosca/fatfree#1116
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkez authored and nanawel committed Sep 15, 2018
1 parent f19e804 commit 82f623e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function exec($cmds,$args=NULL,$ttl=0,$log=TRUE,$stamp=FALSE) {
user_error('PDOStatement: '.$error[2],E_USER_ERROR);
}
if (preg_match('/(?:^[\s\(]*'.
'(?:EXPLAIN|SELECT|PRAGMA|SHOW)|RETURNING)\b/is',$cmd) ||
'(?:WITH|EXPLAIN|SELECT|PRAGMA|SHOW)|RETURNING)\b/is',$cmd) ||
(preg_match('/^\s*(?:CALL|EXEC)\b/is',$cmd) &&
$query->columnCount())) {
$result=$query->fetchall(\PDO::FETCH_ASSOC);
Expand Down

0 comments on commit 82f623e

Please sign in to comment.