当前位置:网站首页>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)
边栏推荐
- A Tiger's Tale
- VPP之DPDK插件
- A comprehensive case of crawler learning -- visiting websites
- C#学习笔记----C#连接MySQL数据库
- 阿门的故事
- GBase 8c 通用文件访问函数
- HCIP第十五天
- Realize OCR language recognition demo (II) - display and interaction of pictures and recognition content
- Prediction of charitable donation behavior by EEG multivariate model analysis
- 26.抽象化和模板思想
猜你喜欢

Process data and change the name of data

总结:Prometheus存储

集合/容器

Brushes and brushes

Graph theory analysis of white matter brain function network: neural markers for classification and prediction of depression

白质脑功能网络图论分析:抑郁症分类和预测的神经标记

Article reproduction: super resolution network fsrcnn

Linux安装mysql8.0.29详细教程

Introduction to QT drawing system

hypermesh 圆周阵列-插件
随机推荐
How tormenting are weekly and monthly reports? Universal report template recommended collection! (template attached)
白质脑功能网络图论分析:抑郁症分类和预测的神经标记
GBase 8c 事务ID和快照(六)
忘记root密码
Real time data warehouse: meituan's real-time data warehouse construction practice
Blizzard Diablo 4 ps5 / PS4 beta added to Playstation database
Matlab 44 animation gradient drawing programs
Niuke net question brushing training (III)
GBase 8c 备份控制函数(三)
Stock problems 5 times
Custom type: structure, enumeration, union
周报、月报有多折磨人?万能报表模板建议收藏!(附模板)
LeetCode高频题128. 最长连续序列,经常被互联网大厂面试考到
以“数字化渠道”撬动家用电器消费蓝海,经销商在线系统让企业生意更进一步
C语言·指针
三舅的故事
A happy old age
一些事情的思考
QT setting Icon
Dart code comments and documentation specification