pg操作符之数据库命令查询\h

方便的数据库操作命令 \h

Available help:
ABORT ALTER SEQUENCE CREATE AGGREGATE CREATE SUBSCRIPTION DROP EXTENSION DROP TEXT SEARCH PARSER REVOKE
ALTER AGGREGATE ALTER SERVER CREATE CAST CREATE TABLE DROP FOREIGN DATA WRAPPER DROP TEXT SEARCH TEMPLATE ROLLBACK
ALTER COLLATION ALTER STATISTICS CREATE COLLATION CREATE TABLE AS DROP FOREIGN TABLE DROP TRANSFORM ROLLBACK PREPARED
ALTER CONVERSION ALTER SUBSCRIPTION CREATE CONVERSION CREATE TABLESPACE DROP FUNCTION DROP TRIGGER ROLLBACK TO SAVEPOINT
ALTER DATABASE ALTER SYSTEM CREATE DATABASE CREATE TEXT SEARCH CONFIGURATION DROP GROUP DROP TYPE SAVEPOINT
ALTER DEFAULT PRIVILEGES ALTER TABLE CREATE DOMAIN CREATE TEXT SEARCH DICTIONARY DROP INDEX DROP USER SECURITY LABEL
ALTER DOMAIN ALTER TABLESPACE CREATE EVENT TRIGGER CREATE TEXT SEARCH PARSER DROP LANGUAGE DROP USER MAPPING SELECT
ALTER EVENT TRIGGER ALTER TEXT SEARCH CONFIGURATION CREATE EXTENSION CREATE TEXT SEARCH TEMPLATE DROP MATERIALIZED VIEW DROP VIEW SELECT INTO
ALTER EXTENSION ALTER TEXT SEARCH DICTIONARY CREATE FOREIGN DATA WRAPPER CREATE TRANSFORM DROP OPERATOR END SET
ALTER FOREIGN DATA WRAPPER ALTER TEXT SEARCH PARSER CREATE FOREIGN TABLE CREATE TRIGGER DROP OPERATOR CLASS EXECUTE SET CONSTRAINTS
ALTER FOREIGN TABLE ALTER TEXT SEARCH TEMPLATE CREATE FUNCTION CREATE TYPE DROP OPERATOR FAMILY EXPLAIN SET ROLE
ALTER FUNCTION ALTER TRIGGER CREATE GROUP CREATE USER DROP OWNED FETCH SET SESSION AUTHORIZATION
ALTER GROUP ALTER TYPE CREATE INDEX CREATE USER MAPPING DROP POLICY GRANT SET TRANSACTION
ALTER INDEX ALTER USER CREATE LANGUAGE CREATE VIEW DROP PROCEDURE IMPORT FOREIGN SCHEMA SHOW
ALTER LANGUAGE ALTER USER MAPPING CREATE MATERIALIZED VIEW DEALLOCATE DROP PUBLICATION INSERT START TRANSACTION
ALTER LARGE OBJECT ALTER VIEW CREATE OPERATOR DECLARE DROP ROLE LISTEN TABLE
ALTER MATERIALIZED VIEW ANALYZE CREATE OPERATOR CLASS DELETE DROP ROUTINE LOAD TRUNCATE
ALTER OPERATOR BEGIN CREATE OPERATOR FAMILY DISCARD DROP RULE LOCK UNLISTEN
ALTER OPERATOR CLASS CALL CREATE POLICY DO DROP SCHEMA MOVE UPDATE
ALTER OPERATOR FAMILY CHECKPOINT CREATE PROCEDURE DROP ACCESS METHOD DROP SEQUENCE NOTIFY VACUUM
ALTER POLICY CLOSE CREATE PUBLICATION DROP AGGREGATE DROP SERVER PREPARE VALUES
ALTER PROCEDURE CLUSTER CREATE ROLE DROP CAST DROP STATISTICS PREPARE TRANSACTION WITH
ALTER PUBLICATION COMMENT CREATE RULE DROP COLLATION DROP SUBSCRIPTION REASSIGN OWNED
ALTER ROLE COMMIT CREATE SCHEMA DROP CONVERSION DROP TABLE REFRESH MATERIALIZED VIEW
ALTER ROUTINE COMMIT PREPARED CREATE SEQUENCE DROP DATABASE DROP TABLESPACE REINDEX
ALTER RULE COPY CREATE SERVER DROP DOMAIN DROP TEXT SEARCH CONFIGURATION RELEASE SAVEPOINT
ALTER SCHEMA CREATE ACCESS METHOD CREATE STATISTICS DROP EVENT TRIGGER DROP TEXT SEARCH DICTIONARY RESET

\h带上具体命令可用看详细的语法,甚至还有讲解的链接
postgres=# \h create role
Command: CREATE ROLE
Description: define a new database role
Syntax:
CREATE ROLE name [ [ WITH ] option [ … ] ]

where option can be:

SUPERUSER | NOSUPERUSER
| CREATEDB | NOCREATEDB
| CREATEROLE | NOCREATEROLE
| INHERIT | NOINHERIT
| LOGIN | NOLOGIN
| REPLICATION | NOREPLICATION
| BYPASSRLS | NOBYPASSRLS
| CONNECTION LIMIT connlimit
| [ ENCRYPTED ] PASSWORD ‘password’ | PASSWORD NULL
| VALID UNTIL ‘timestamp’
| IN ROLE role_name [, …]
| IN GROUP role_name [, …]
| ROLE role_name [, …]
| ADMIN role_name [, …]
| USER role_name [, …]
| SYSID uid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
URL: https://www.postgresql.org/docs/12/sql-createrole.html
————————————————
版权声明:本文为CSDN博主「梁敬彬」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_39534833/article/details/103300265

你可能感兴趣的:(PostgreSQL)