当前位置:网站首页>Gbase 8C general file access function
Gbase 8C general file access function
2022-07-28 01:55:00 【Dazhuang twelve】
The general file access function provides a local access interface to the files on the database server . Only GBase 8c Contents and log_directory The files in the directory can be accessed . Use relative paths to access GBase 8c Files in the directory , And matching log_directory Configure the path set to access the log file . Only database initialization users can use these functions .
pg_ls_dir(dirname text)
describe : List the files in the directory .
return type :setof text
remarks :pg_ls_dir Return the special items in the specified directory “.” and “..” All names except .
Example :
gbase=# SELECT pg_ls_dir('./');
pg_ls_dir
----------------------
global
pg_xlog
pg_clog
pg_csnlog
pg_notify
pg_serial
pg_snapshots
pg_twophase
pg_multixact
base
pg_replslot
pg_tblspc
pg_stat_tmp
pg_llog
pg_errorinfo
undo
pg_logical
pg_location
PG_VERSION
pg_ctl.lock
postgresql.conf.lock
postmaster.pid.lock
mot.conf
gs_gazelle.conf
pg_hba.conf
pg_ident.conf
postgresql.conf.bak
server.crt
server.key
cacert.pem
server.key.cipher
server.key.rand
pg_hba.conf.lock
pg_hba.conf.bak
gaussdb.state
postmaster.opts
gswlm_userinfo.cfg
postgresql.conf
postmaster.pid
(39 rows)
pg_read_file(filename text, offset bigint, length bigint)
describe : Return the contents of a text file .
return type :text
remarks :pg_read_file Returns part of a text file , from offset Start , Back at most length byte ( If you reach the end of the file first , Is less than this value ). If offset It's a negative number , Then it is the length of the fallback relative to the end of the file . If you omit offset and length, Then the entire file is returned .
Example :
gbase=# SELECT pg_read_file('postmaster.pid',0,100);
pg_read_file
-------------------------------------------
7961 +
/home/gbase/project/install/data/dn/dn1_1+
1651723153 +
20008 +
/home/gbase/gbase8c/tmp +
[local_ip] +
2
(1 row)
边栏推荐
- 递归相关习题
- 2.2 comprehensive application questions - sequence table
- The story of amen
- C语言·指针
- Niuke multi School Game 3 A, c+ weight segment tree
- Mark's story
- "Do you" want to be a test / development programmer? We strive to sprout
- For newly installed PIP3, use no module named 'LSB_ Release 'problem
- VLAN experiment
- 2.2综合应用题-顺序表
猜你喜欢

"Do you" want to be a test / development programmer? We strive to sprout

处理数据 给数据换名字

Introduction to routing strategy

机器学习如何做到疫情可视化——疫情数据分析与预测实战

物企大变局时代,SRM供应商采购系统助力企业打造物业采购数字化标杆

【taichi】在太极中画出规整的网格

Introduction to QT drawing system

FreeRTOS内核小结

IIC读写EEFPROM

Can ordinary equipment access TSN time sensitive network?
随机推荐
【taichi】在太极中画出规整的网格
unreal ue4.27 switchboard 移植出引擎流程
Niuke net question brushing training (III)
A comprehensive case of crawler learning -- visiting websites
Modify the request path using the streaming API of gateway
Cap principle of [distributed development]
Dart code comments and documentation specification
Linux安装mysql8.0.29详细教程
简单为美-编程思路
VLAN experiment
For newly installed PIP3, use no module named 'LSB_ Release 'problem
A happy old age
C#学习笔记----C#连接MySQL数据库
Favorite songs
HCIP第十五天
26. Abstraction and template ideas
Leetcode: 515. Find the maximum value in each tree row
IIC读写EEFPROM
总结:Prometheus存储
阿门的故事