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
随机推荐
- zipimport.ZipImportError: can't find module 'encodings'
环境说明:windows 7.python 3.7.0.pyinstaller 3.1. 解决方案:升级pyinstaller 到 3.4.
- es第三篇:Search APIs
大多数search API都是可以操作多个索引的,除了explain API. 当执行一个search API时,可以指定routing参数,去搜索特定的主分片及其副本分片.routing参数值可以是 ...
- spring项目中aop的使用
AOP:是一种面向切面的编程范式,是一种编程思想,旨在通过分离横切关注点,提高模块化,可以跨越对象关注点.Aop的典型应用即spring的事务机制,日志记录.利用AOP可以对业务逻辑的各个部分进行隔离 ...
- Oracle PL/SQL编程之包(packages)
1.简介 包用于在逻辑上组合过程和函数,它由包规范和包体组成. 我们可以使用create package来创建包,代码如下: ok,包创建完成,通过包的代码发现包的功能就是申明包中包含的过程和方法,红 ...
- PHP和Java中foreach循环的用法区别
1.foreach语句介绍: ①PHP: foreach 语法结构提供了遍历数组的简单方式.foreach 仅能够应用于数组和对象,如果尝试应用于其他数据类型的变量,或者未初始化的变量将发出错误信息. ...
- ps如何替换有透明图片的颜色
修改透明图片的颜色 首先用魔棒工具点选颜色区域,然后再在菜单中找到 图像-调整-替换颜色,就可以选任意想要的颜色
- ES6数组新加 Buff
欢迎关注本人公众号<迈向大前端>,里面有15本前端相关的电子书,送给在前端路上迷茫的同学们! 本章篇幅很长,分开来发,这一小篇主要讲ES6数组的Array.of()和Array.from( ...
- 【c++】输出文件的每个单词、行
假设文件内容为 1. hello1 hello2 hello3 hello4 2. dsfjdosi 3. skfskj ksdfls 输出每个单词 代码 #include <iostream& ...
- 《C++ Primer》〓〓〓〓〓〓〓〓〓〓【第七章】
7.5.1 构造函数初始化列表 如果成员是const.引用,或者属于某种未提供默认构造函数的类类型,我们必须通过构造函数初始值列表为这些成员提供初值. 成员的初始化顺序与他们在类定义中的出现顺序一致. ...
- bzoj 4942: [Noi2017]整数
Description Solution 加法减法可以分开考虑,如果只有加法的话,直接暴力进位复杂度是对的 询问的时候就是把两个二进制数做差,判断第 \(k\) 位的取值 实际上我们只需要判断 \(1 ...