Merge "rdbms: make selectRowCount() use $var argument to exclude NULLs"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabasePostgres.php
index c945c35..13d9158 100644 (file)
@@ -805,7 +805,13 @@ __INDEXATTR__;
        }
 
        public function wasDeadlock() {
-               return $this->lastErrno() == '40P01';
+               // https://www.postgresql.org/docs/8.2/static/errcodes-appendix.html
+               return $this->lastErrno() === '40P01';
+       }
+
+       public function wasLockTimeout() {
+               // https://www.postgresql.org/docs/8.2/static/errcodes-appendix.html
+               return $this->lastErrno() === '55P03';
        }
 
        public function duplicateTableStructure(