数据仓库服务 GAUSSDB(DWS)-通用文件访问函数:pg_ls_dir(dirname text)

时间:2024-12-06 15:12:39

pg_ls_dir(dirname text)

描述:列出目录中的文件。

返回值类型:setof text

备注:pg_ls_dir返回指定目录里面的除了特殊项“.”和“..”之外所有名字。

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
SELECT pg_ls_dir('./');
      pg_ls_dir       
----------------------
 .postgresql.conf.swp
 postgresql.conf
 pg_tblspc
 PG_VERSION
 pg_ident.conf
 core
 server.crt
 pg_serial
 pg_twophase
 postgresql.conf.lock
 pg_stat_tmp
 pg_notify
 pg_subtrans
 pg_ctl.lock
 pg_xlog
 pg_clog
 base
 pg_snapshots
 postmaster.opts
 postmaster.pid
 server.key.rand
 server.key.cipher
 pg_multixact
 pg_errorinfo
 server.key
 pg_hba.conf
 pg_replslot
 .pg_hba.conf.swp
 cacert.pem
 pg_hba.conf.lock
 global
 gaussdb.state
(32 rows)
support.huaweicloud.com/sqlreference-910-dws/dws_06_0054.html