Commit e9346b99 authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Remove tabs and fix some formatting in Bugzilla::DB::Pg.

parent ff3ae632
...@@ -198,10 +198,10 @@ sub sql_string_until { ...@@ -198,10 +198,10 @@ sub sql_string_until {
# PostgreSQL does not permit a negative substring length; therefore we # PostgreSQL does not permit a negative substring length; therefore we
# use CASE to only perform the SUBSTRING operation when $substring can # use CASE to only perform the SUBSTRING operation when $substring can
# be found withing $string. # be found withing $string.
return "CASE WHEN " . $self->sql_position($substring, $string) my $position = $self->sql_position($substring, $string);
. " != 0 THEN SUBSTRING($string FROM 1 FOR " return "CASE WHEN $position != 0"
. $self->sql_position($substring, $string) . " - 1)" . " THEN SUBSTRING($string FROM 1 FOR $position - 1)"
. " ELSE $string END"; . " ELSE $string END";
} }
# Tell us whether or not a particular sequence exists in the DB. # Tell us whether or not a particular sequence exists in the DB.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment