↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / System Administration Functions

Returns the names of all files (and directories and other special files) in the specified directory.

Reading PG 18current·documented in 22 of 27 versions, 8.1 to 20

Signatures & examples

pg_ls_dir ( dirname text [, missing_ok boolean, include_dot_dirs boolean ] ) → setof text
Returns the names of all files (and directories and other special files) in the specified directory. The include_dot_dirs parameter indicates whether “.” and “..” are to be included in the result set; the default is to exclude them. Including them can be useful when missing_ok is true, to distinguish an empty directory from a non-existent directory.
Version history 4
  1. 12 → 13 changed
  2. 10 → 11 changed
  3. 9.4 → 9.5 changed
  4. 8.0 → 8.1 added

Definition snapshot: b7bd9cda · English manual source