Postgresql – Recursive query to calculate folder size including nested files
I have a table where both files and folders are stored. If type = 'folder', then it represents a folder; otherwise, it's a file. By default, the size field is set for all files, but for folders, it is always…