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的更多相关文章

  1. C++ QUICK REFERENCE

    C++ string 用法详解 字符串分割(C++)  C++ QUICK REFERENCE Matt Mahoney, mmahoney@cs.fit.edu DECLARATIONS enum ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. The Pragmatic Programmer Quick Reference Guide

    1.关心你的技艺 Care About Your Craft 如果不在乎能否漂亮地开发出软件,你又为何要耗费生命去开发软件呢? 2.思考!你的工作 Think! About Your Work 关掉自 ...

  6. [译]AMQP 0-9-1 Quick Reference : basic

    Basic basic.ack(delivery-tag delivery-tag, bit multiple)Support: fullAcknowledge one or more message ...

  7. SQL Quick Reference From W3Schools

    SQL Statement Syntax AND / OR SELECT column_name(s)FROM table_nameWHERE conditionAND|OR condition AL ...

  8. eigen quick reference

    参考: http://eigen.tuxfamily.org/dox/AsciiQuickReference.txt // A simple quickref for Eigen. Add anyth ...

  9. objective-c Quick Reference

随机推荐

  1. linux mint 18.1 安装nvidia显卡驱动

    原文地址 http://www.gamersonlinux.com/forum/threads/updating-nvidia-drivers-mint.1746/ 主要步骤很简答 就是将ppa仓库地 ...

  2. MySql的视图

    视图是从一个或多个表中导出的表.是一种虚拟存在的表.视图就像一个窗口,通过这个窗口可以看到系统专门提供的数据.这样,用户可以不用看到整个数据库表中数据,而只关心对自己有用的数据.视图可以使用户的操作更 ...

  3. [转载+补充]windows下SVN客户端的安装

    来源:TortoiseSVN新人使用指南 1. 首先安装SVN客户端,windows一般选择乌龟客户端https://tortoisesvn.net/downloads.html. 2. 根据系统位数 ...

  4. [shell基础]——变量

    变量的赋值 #定义变量,注意等号两边没有任何空格 variable=#定义环境变量export variable= #双引号:可含空格.可转义特殊字符 variable=" " # ...

  5. ASP.NET 页生命周期概述1

    ASP.NET 页运行时,此页将经历一个生命周期,在生命周期中将执行一系列处理步骤.这些步骤包括初始化.实例化控件.还原和维护状态.运行事件处理程序代码以及进行 呈现.了解页生命周期非常重要,因为这样 ...

  6. MVC-cshtml(条件编译已关闭)

    加单引号    

  7. ASP.NET MVC4 新手入门教程之二 ---2.添加控制器

    MVC 代表 模型-视图-控制器.MVC 是一个模式用于开发应用程序是很好的架构. 可检验性和易于维护.基于 MVC 的应用程序包含: Models: 类表示应用程序的数据并使用验证逻辑以执行这些数据 ...

  8. Javascript基础系列之(五)条件语句(逻辑操作符)

    javascript和其它语言一样,逻辑运算主要包括 与运算&& ,或运算 II  和非运算 ! 与运算(&&)是指两个条件都为true时,整个表达式为true,或运算 ...

  9. [javaEE] 三层架构案例-用户模块(二)

    使用junit测试框架,测试查找用户和添加用户功能 com.tsh.test.xmlUserDaoTest package com.tsh.test; import org.junit.Test; i ...

  10. mysql自定义变量

    mysql可以实现自定义变量,使用方式非常简单,代码如下: SELECT @i:=@i + 1 // 查询变量,值+1 FROM () i // 声明变量,初始值为0 如果有多条数据,那么这个变量就会 ...