At the 3.2.5 file-storage the folders and the files are ordered by the
sort_key, which gets generated via the procedure fs_order_files and
there via the select which gets ordered by fs_connect_by(file_id).
This way the folders and its files are ordered by their creation date.
After that the sort_keys are updated in the fs_files table.
I am thinking of adding an extra row to fs_files maybe called
sort_key_by_file_title which displays all the folders and their files
ordered by file_title and not by creation time...
I would have to write another procedure similar to fs_connect_by that
orders the file_ids by their file_title and their dependency.
create function fs_connect_by(integer) returns text as '
declare
id alias for $1;
pid integer;
BEGIN
select into pid parent_id from fs_files where id = file_id;
IF pid is null
THEN
return fs_gen_key(id);
ELSE
return fs_connect_by(pid) || ''/'' || fs_gen_key(id);
END IF;
END;
' language 'plpgsql';
I am stuck right here... Does anyone have an idea?