X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDatabasePostgres.php;h=bdac06c121929405338c946223fdebd694bd5373;hb=ddf3d27b108f5d2562b9aff80137e2c818a7ae26;hp=fd0956aed54a6845e06f7248e874084c6447d2d1;hpb=d18df9bf58365ba7e4723058145fb9704c4c432f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php index fd0956aed5..bdac06c121 100644 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -1370,6 +1370,13 @@ SQL; return false; } + public function serverIsReadOnly() { + $res = $this->query( "SHOW default_transaction_read_only", __METHOD__ ); + $row = $this->fetchObject( $res ); + + return $row ? ( strtolower( $row->default_transaction_read_only ) === 'on' ) : false; + } + /** * @param string $lockName * @return string Integer