Skip to content

Commit

Permalink
use string comparision in postgres for errors.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@1259 f67b2e87-0811-0410-a7e0-dd94e48410d6
  • Loading branch information
robbat2 committed Jan 9, 2009
1 parent 822fd67 commit 505b9ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/lib/MogileFS/Store/Postgres.pm
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ sub was_duplicate_error {
my $self = shift;
my $dbh = $self->dbh;
return 0 unless $dbh->err;
return 1 if $dbh->state == '23505' || $dbh->errstr =~ /duplicate/i;
return 1 if $dbh->state eq '23505' || $dbh->errstr =~ /duplicate/i;
}

sub table_exists {
Expand Down

0 comments on commit 505b9ce

Please sign in to comment.