Re: pg_ls_tmpdir to show directories and shared filesets (andpg_ls_*) - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pg_ls_tmpdir to show directories and shared filesets (andpg_ls_*)
Date
Msg-id alpine.DEB.2.21.2004121145190.5257@pseudo
Whole thread Raw
In response to Re: pg_ls_tmpdir to show directories and shared filesets (andpg_ls_*)  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: pg_ls_tmpdir to show directories and shared filesets (andpg_ls_*)  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
Hello Justin,

About v15, seen as one patch.

Patches serie applies cleanly, compiles, "make check" ok.

Documentation:
  - indent documentation text around 80 cols, as done around?
  - indent SQL example for readability and capitalize keywords
    (pg_ls_dir_metadata)
  - "For each file in a directory, list the file and its metadata."
    maybe: "List files and their metadata in a directory"?

Code:
  - Most pg_ls_*dir* functions call pg_ls_dir_files(), which looks like
    reasonable refactoring, ISTM that the code is actually smaller.
  - please follow pg style, eg not "} else {"
  - there is a "XXX" (meaning fixme?) tag remaining in a comment.
  - file types: why not do block & character devices, fifo and socket
    as well, before the unkown case?
  - I'm wondering whether could pg_stat_file call pg_ls_dir_files without
    too much effort? ISTM that the output structure nearly the same. I do
    not like much having one function specialized for files and one for
    directories.

Tests:
  - good, there are some!
  - indent SQL code, eg by starting a new line on new clauses?
  - put comments on separate lines (I'm not against it on principle, I do
    that, but I do not think that it is done much in test files).

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: pg_stat_statements issue with parallel maintenance (Was Re: WALusage calculation patch)
Next
From: James Coleman
Date:
Subject: Re: execExprInterp() questions / How to improve scalar array op expr eval?