rdbms: define wasLockTimeout() for postgres
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabasePostgres.php
index 7b2ef83..49c945e 100644 (file)
@@ -799,7 +799,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(