当前位置:网站首页>PostgreSQL views tables, table indexes, views, table structures, and parameter settings
PostgreSQL views tables, table indexes, views, table structures, and parameter settings
2022-07-25 01:50:00 【Xiao Guangbiao】
PostgreSQL See the table 、 Table index 、 View 、 Table structure and parameter settings
– Table index
select * from pg_indexes where tablename='person_wechat_label';
select * from pg_statio_all_indexes where relname='person_wechat_label';
– All tables
SELECT * FROM pg_tables;
– All views
SELECT * FROM pg_views;
– Table structure
SELECT a.attnum,a.attname AS field,t.typname AS type,a.attlen AS length,a.atttypmod AS lengthvar,a.attnotnull AS notnull,b.description AS comment FROM pg_class c,pg_attribute a LEFT OUTER JOIN pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid,pg_type t WHERE c.relname = 'person_wechat_label' and a.attnum > 0 and a.attrelid = c.oid and a.atttypid = t.oid ORDER BY a.attnum;
– Export data from a database to a file
\copy (select * from "user") to '/tmp/1.txt';
– Parameter setting :https://yq.aliyun.com/articles/697710
边栏推荐
- Google Earth engine - 1980 present global pressure, temperature, wind and other data sets
- Academicians said: researchers should also support their families. They can only do short-term and fast research if they are not promoted
- Safety management and application of genomic scientific data
- Kubernetes creates a user with dashboard read-only permission (with exec permission)
- Summary of the most complete MySQL data types in history (Part 2)
- Jsonp solves cross domain plug-ins (JS, TS)
- Custom type
- Gerrit statistics script
- AWD thinking
- Open source demo | release of open source example of arcall applet
猜你喜欢

Talk about resume optimization and interview skills of algorithm post!

Start to build a three node Eureka cluster

Why can't reading more books improve your writing?

Speed comparison between 64 bit width and 32 bit width of arm64 memory
![[29. DFS depth is preferred]](/img/f1/f0c4302a1f7c14c206ff0bdf2eed5c.png)
[29. DFS depth is preferred]

Take the first place in the International Olympic Games in mathematics, physics and chemistry, and win all the gold medals. Netizen: the Chinese team is too good

How to empty localstorage before closing a page
![[27. Expression evaluation (infix expression)]](/img/af/cf3c4a441232caeea9f9927ebdf87b.png)
[27. Expression evaluation (infix expression)]

Standard transfer function

Promise basic use
随机推荐
Data governance notes
Open sharing of scientific data in the context of open science: the practice of the national Qinghai Tibet Plateau scientific data center
Google Earth engine - 1980 present global pressure, temperature, wind and other data sets
Multithreading and high concurrency (II) -- synchronized locking and unlocking process
Academicians said: researchers should also support their families. They can only do short-term and fast research if they are not promoted
The importance of system to Philosophy Hegel
Commonjs export import
MySQL Basics (concepts, common instructions)
How can arm access the Internet through a laptop?
Upgrade the leapfrog products again, and the 2023 Geely Xingrui will be sold from 113700 yuan
Introduction to ORM framework - what is ORM framework?
Take the first place in the International Olympic Games in mathematics, physics and chemistry, and win all the gold medals. Netizen: the Chinese team is too good
[hero planet July training leetcode problem solving daily] 20th BST
Speed comparison between 64 bit width and 32 bit width of arm64 memory
The difference between sigsuspend and sigwait
Pursue and kill "wallet Assassin" all over the network
Musk responded whether he would upload his brain to the cloud: already did it!
Open source demo | release of open source example of arcall applet
Promise basic use
Agreement on sharing agricultural scientific data in China