pg数据库执行sql文件_在postgresql中通过命令行执行sql文件

General\copyright show PostgreSQL usage and distribution terms\g [FILE] or ; execute query (and send results to file or |pipe)\h [NAME] help on syntax of SQL commands, * for all commands\q ...
摘要由CSDN通过智能技术生成

General

\copyright show PostgreSQL usage and distribution terms

\g [FILE] or ; execute query (and send results to file or |pipe)

\h [NAME] help on syntax of SQL commands, * for all commands

\q quit psql

Query Buffer

\e [FILE] [LINE] edit the query buffer (or file) with external editor

\ef [FUNCNAME [LINE]] edit function definition with external editor

\p show the contents of the query buffer

\r reset (clear) the query buffer

\s [FILE] display history or save it to file

\w FILE write query buffer to file

Input/Output

\copy ... perform SQL COPY with data stream to the client host

\echo [STRING] write string to standard output

\i FILE execute commands from file

\o [FILE] send all query results to file or |pipe

\qecho [STRING] write string to query output stream (see \o)

Informational

(options: S = show system objects, + = additional detail)

\d[S+] list tables, views, and sequences

\d[S+] NAME describe table, view, sequence, or index

\da[S] [PATTERN] list aggregates

\db[+] [PATTERN] list tablespaces

\dc[S] [PATTERN] list conversions

\dC [PATTERN] list casts

\dd[S] [PATTERN] show comments on objects

\ddp [PATTERN] list default privileges

\dD[S] [PATTERN] list domains

\det[+] [PATTERN] list foreign tables

\des[+] [PATTERN] list foreign servers

\deu[+] [PATTERN] list user mappings

\dew[+] [PATTERN] list foreign-data wrappers

\df[antw][S+] [PATRN] list [only agg/normal/trigger/window] functions

\dF[+] [PATTERN] list text search configurations

\dFd[+] [PATTERN] list text search dictionaries

\dFp[+] [PATTERN] list text search parsers

\dFt[+] [PATTERN] list text search templates

\dg[+] [PATTERN] list roles

\di[S+] [PATTERN] list indexes

\dl list large objects, same as \lo_list

\dL[S+] [PATTERN] list procedural languages

\dn[S+] [PATTERN] list schemas

\do[S] [PATTERN] list operators

\dO[S+] [PATTERN] list collations

\dp [PATTERN] list table, vie

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值