X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdb%2FDatabasePostgres.php;h=c9127ff599a3061f2ce3ffe578cfada30395a966;hb=708c02281e6e8880ae2cebbda7f353ce97841f94;hp=87c977dce6cbe63d6383edf9e41cb5a48ad909ce;hpb=de94dd9f4112067903bc6e1d5ce06991db84f02f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 87c977dce6..c9127ff599 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -838,7 +838,7 @@ __INDEXATTR__; $tempres = (bool)$this->query( $tempsql, $fname, $savepoint ); if ( $savepoint ) { - $bar = pg_last_error(); + $bar = pg_result_error( $this->mLastResult ); if ( $bar != false ) { $savepoint->rollback(); } else { @@ -863,7 +863,7 @@ __INDEXATTR__; $sql .= '(' . $this->makeList( $args ) . ')'; $res = (bool)$this->query( $sql, $fname, $savepoint ); if ( $savepoint ) { - $bar = pg_last_error(); + $bar = pg_result_error( $this->mLastResult ); if ( $bar != false ) { $savepoint->rollback(); } else { @@ -946,7 +946,7 @@ __INDEXATTR__; $res = (bool)$this->query( $sql, $fname, $savepoint ); if ( $savepoint ) { - $bar = pg_last_error(); + $bar = pg_result_error( $this->mLastResult ); if ( $bar != false ) { $savepoint->rollback(); } else { @@ -1383,6 +1383,11 @@ SQL; return (bool)$exists; } + /** + * @var string $table + * @var string $field + * @return PostgresField|null + */ function fieldInfo( $table, $field ) { return PostgresField::fromText( $this, $table, $field ); }