Merge "Remove "@author Umherirrender" annotations"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabasePostgres.php
index fd0956a..bdac06c 100644 (file)
@@ -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