调用外部命令

最近更新时间: 2024-10-17 17:10:00

postgres=# \! cat /data/tbase/tbase.sql
set search_path = public;
insert into tbase values(1,2);
select count(1) from tbase;
postgres=# \! ls
data1  data2  data3  install  
postgres=# \! ls -l
total 0
drwxrwxr-x 3 tbase tbase 28 Sep 18 11:05 data1
drwxrwxr-x 3 tbase tbase 28 Sep 18 11:05 data2
drwxrwxr-x 3 tbase tbase 28 Sep 18 11:17 data3
drwxr-xr-x 3 tbase tbase 23 Sep 18 10:55 install
postgres=#