Skip to content

Commit c8b1053

Browse files
bariqhibatinian
authored andcommitted
fix extension function by getting the last item of a split
Signed-off-by: Bariq <[email protected]>
1 parent 8c940ae commit c8b1053

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/db/02-storage-schema.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ BEGIN
7171
select string_to_array(name, '/') into _parts;
7272
select _parts[array_length(_parts,1)] into _filename;
7373
-- @todo return the last part instead of 2
74-
return split_part(_filename, '.', 2);
74+
return reverse(split_part(reverse(_filename), '.', 1));
7575
END
7676
$function$;
7777

0 commit comments

Comments
 (0)