GPDB 5.x PSQL Quick Reference
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] edit the query buffer (or file) with external editor
\ef [FUNCNAME] 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) Formatting
\a toggle between unaligned and aligned output mode
\C [STRING] set table title, or unset if none
\f [STRING] show or set field separator for unaligned query output
\H toggle HTML output mode
\pset NAME [VALUE] set table output option (NAME := {format | border | expanded | fieldsep | footer | null | numericlocale | recordsep | tuples_only | title | tableattr | pager})
\t [on|off] show only rows
\T [STRING] set HTML <table> tag attributes, or unset if none
\x [on|off] toggle expanded output Connection
\c[onnect] [DBNAME | - USER | - HOST | - PORT | -] connect to new database
\encoding [ENCODING] show or set client encoding
\password [USERNAME] securely change the password for a user
\conninfo display information about current connection Variables
\prompt [TEXT] NAME prompt user to set internal variable
\set [NAME [VALUE]] set internal variable, or list all if no parameters
\unset NAME unset (delete) internal variable 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
\des[+] [PATTERN] list foreign servers
\deu[+] [PATTERN] list user mappings
\dew[+] [PATTERN] list foreign-data wrappers
\dE [PATTERN] list external tables
\df[antw][S+] [PATTERN] 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
\dg[+] [PATTERN] list roles (groups)
\dFt[+] [PATTERN] list text search templates
\di[S+] [PATTERN] list indexes
\dl list large objects, same as \lo_list
\do[S] [PATTERN] list operators
\dp [PATTERN] list table, view, and sequence access privileges
\dr[S+] [PATTERN] list foreign tables
\drds [PATTERN1 [PATTERN2]] list per-database role settings
\ds[S+] [PATTERN] list sequences
\dt[S+] [PATTERN] list tables
\dT[S+] [PATTERN] list data types
\du[+] [PATTERN] list roles (users)
\dv[S+] [PATTERN] list views
\dx[+] [PATTERN] list installed extensions
\l[+] list all databases
\z [PATTERN] same as \dp Operating System
\cd [DIR] change the current working directory
\timing [on|off] toggle timing of commands
\! [COMMAND] execute command in shell or start interactive shell Large Objects
\lo_export LOBOID FILE Large Object Operations
\lo_import FILE [COMMENT]
\lo_list
\lo_unlink LOBOID -------------------------------
by jackical 整理
官方链接
http://gpdb.docs.pivotal.io/530/pdf/PSQLQuickRef-A02.pdf
GPDB 5.x PSQL Quick Reference的更多相关文章
- C++ QUICK REFERENCE
C++ string 用法详解 字符串分割(C++) C++ QUICK REFERENCE Matt Mahoney, mmahoney@cs.fit.edu DECLARATIONS enum ...
- Quick Reference Card Urls For Web Developer
C# C# Cheatsheet & Notes Coding Guidelines for C# 3.0, 4.0, 5.0 Core C# and .NET Quick Reference ...
- ASP.NET Web Pages (Razor) API Quick Reference
ASP.NET Web Pages (Razor) API Quick Reference By Tom FitzMacken|February 10, 2014 Print This page co ...
- MongoDB - The mongo Shell, mongo Shell Quick Reference
mongo Shell Command History You can retrieve previous commands issued in the mongo shell with the up ...
- The Pragmatic Programmer Quick Reference Guide
1.关心你的技艺 Care About Your Craft 如果不在乎能否漂亮地开发出软件,你又为何要耗费生命去开发软件呢? 2.思考!你的工作 Think! About Your Work 关掉自 ...
- [译]AMQP 0-9-1 Quick Reference : basic
Basic basic.ack(delivery-tag delivery-tag, bit multiple)Support: fullAcknowledge one or more message ...
- SQL Quick Reference From W3Schools
SQL Statement Syntax AND / OR SELECT column_name(s)FROM table_nameWHERE conditionAND|OR condition AL ...
- eigen quick reference
参考: http://eigen.tuxfamily.org/dox/AsciiQuickReference.txt // A simple quickref for Eigen. Add anyth ...
- objective-c Quick Reference
随机推荐
- JavaMail 实现发送验证码,带验证码模板的
package util; import java.io.File; import java.io.FileOutputStream; import java.util.Properties; imp ...
- js中报错"Maximum call stack size exceeded"解决方法
Uncaught RangeError: Maximum call stack size exceeded 错误直译过来就是“栈溢出”,出现这个错误的原因是因为我进行了递归运算,但是忘记添加判断条件, ...
- 在bootstrap modal 中加载百度地图的信息窗口失效解决方法
这个问题其实很傻,解决方法没有任何技术含量,只是记录下工作中发生的事. 前阵子给一个汽车集团客户做了一个经销商查询系统,其中一个功能是使用地图标注经销商店面地址,并且实现导航功能. 页面演示地址:ht ...
- 初次使用github的艰难尝试。
序言 github是全英文的网站,初次使用在没有翻译成中文的情况下很容易做出很多无意义或误操作. 当对本地的文件进行修改后,有时候只是想更新到fork下来的自己的仓库里,看看改得效果如何 .有时候是想 ...
- Bugfree安装与使用
第一步:下载XAMPP和bugfree http://www.bugfree.org.cn/ http://www.apachefriends.org/zh_cn/xampp.html 第二步:安装 ...
- POI基本操作
1.读取excel文件 InputStream is = new FileInputStream(filesrc); POIFSFileSystem fs = new POIFSFileSystem( ...
- 基于CommonKADS方法论实现知识库系统
说明:本文是Knowledge-based systems with thecommonKADS method文章的翻译. 一.知识库系统的背景 1. 什么是知识库系统(KBS) 知识库系统是人工智能 ...
- 027-MyBatis相关配置模板
SqlMapConfig.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE confi ...
- Log4J2 配置文件模板及代码说明
Log4j是Apache的著名项目,随着Java应用的越来越广泛,对日志性能等方面的要求也越来越高.Log4j的升级版本Log4j2在前些年发布.Log4J2的优点和好处有很多,可以自行搜索查阅相关文 ...
- Message Queue基本使用说明
一.安装Message Queue: 在Win7之前,控制面板,添加删除组件(Windows Message Queue). Win7~Win8:控制面板,程序和功能,启用或关闭Windows功能(找 ...