查看postgres数据库的编码格式
答案:2 悬赏:50 手机版
解决时间 2021-03-16 20:04
- 提问者网友:藍了天白赴美
- 2021-03-16 10:51
查看postgres数据库的编码格式
最佳答案
- 五星知识达人网友:天凉才是好个秋
- 2021-03-16 11:00
这个也是从 oid2name 中扒出来的:
[postgres@localhost bin]$ ./oid2name -d postgres
From database "postgres":
now:
SELECt pg_catalog.pg_relation_filenode(c.oid) as "Filenode", relname as "Table Name" FROM pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),pg_catalog.pg_tablespace t WHERe relkind IN ('r') AND n.nspname NOT IN ('pg_catalog', 'information_schema') AND n.nspname !~ '^pg_toast' AND t.oid = CASE WHEN reltablespace <> 0 THEN reltablespace ELSE dattablespace END ORDER BY relname
Filenode Table Name
[postgres@localhost bin]$ ./oid2name -d postgres
From database "postgres":
now:
SELECt pg_catalog.pg_relation_filenode(c.oid) as "Filenode", relname as "Table Name" FROM pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),pg_catalog.pg_tablespace t WHERe relkind IN ('r') AND n.nspname NOT IN ('pg_catalog', 'information_schema') AND n.nspname !~ '^pg_toast' AND t.oid = CASE WHEN reltablespace <> 0 THEN reltablespace ELSE dattablespace END ORDER BY relname
Filenode Table Name
全部回答
- 1楼网友:忘川信使
- 2021-03-16 11:12
命令如下:
sudo apt-get install postgresql
在安装的过程中,会自动创建一个postgres的默认账户,可以在该账户下执行各种sql命令。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯