select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Search PostgreSQL documentation

PG 18 · Browse by category, or enter a name or keyword

Category index100
\psetpsql CommandsPG18\pset [ option [ value ] ] This command sets options affecting the output of query result tables. option indicates which option is to be set. The semantics of value vary depending on the sel…psql › Usage › Meta-Commands \qpsql CommandsPG18\q or \quit Quits the psql program. In a script file, only execution of that script is terminated.psql › Usage › Meta-Commands \qechopsql CommandsPG18\qecho text [ ... ] This command is identical to \echo except that the output will be written to the query output channel, as set by \o.psql › Usage › Meta-Commands \rpsql CommandsPG18\r or \reset Resets (clears) the query buffer.psql › Usage › Meta-Commands \restrictpsql CommandsPG18\restrict restrict_key Enter "restricted" mode with the provided key. In this mode, the only allowed meta-command is \unrestrict, to exit restricted mode. The key may contain only alphanumer…psql › Usage › Meta-Commands \spsql CommandsPG18\s [ filename ] Print psql's command line history to filename. If filename is omitted, the history is written to the standard output (using the pager if appropriate). This command is not ava…psql › Usage › Meta-Commands \setpsql CommandsPG18\set [ name [ value [ ... ] ] ] Sets the psql variable name to value, or if more than one value is given, to the concatenation of all of them. If only one argument is given, the variable is …psql › Usage › Meta-Commands \setenvpsql CommandsPG18\setenv name [ value ] Sets the environment variable name to value, or if the value is not supplied, unsets the environment variable. Example: testdb=> \setenv PAGER less testdb=> \setenv LE…psql › Usage › Meta-Commands \sfpsql CommandsPG18\sf[+] function_description This command fetches and shows the definition of the named function or procedure, in the form of a CREATE OR REPLACE FUNCTION or CREATE OR REPLACE PROCEDURE comma…psql › Usage › Meta-Commands \startpipelinepsql CommandsPG18\startpipeline\sendpipeline\syncpipeline\endpipeline\flushrequest\flush\getresults [ number_results ] This group of commands implements pipelining of SQL statements. A pipeline must begin wi…psql › Usage › Meta-Commands \svpsql CommandsPG18\sv[+] view_name This command fetches and shows the definition of the named view, in the form of a CREATE OR REPLACE VIEW command. The definition is printed to the current query output chann…psql › Usage › Meta-Commands \tpsql CommandsPG18\t Toggles the display of output column name headings and row count footer. This command is equivalent to \pset tuples_only and is provided for convenience.psql › Usage › Meta-Commands \timingpsql CommandsPG18\timing [ on | off ] With a parameter, turns displaying of how long each SQL statement takes on or off. Without a parameter, toggles the display between on and off. The display is in millise…psql › Usage › Meta-Commands \unrestrictpsql CommandsPG18\unrestrict restrict_key Exit "restricted" mode (i.e., where all other meta-commands are blocked), provided the specified key matches the one given to \restrict when restricted mode was ente…psql › Usage › Meta-Commands \unsetpsql CommandsPG18\unset name Unsets (deletes) the psql variable name. Most variables that control psql's behavior cannot be unset; instead, an \unset command is interpreted as setting them to their default v…psql › Usage › Meta-Commands \wpsql CommandsPG18\w or \write filename\w or \write |command Writes the current query buffer to the file filename or pipes it to the shell command command. If the current query buffer is empty, the most recen…psql › Usage › Meta-Commands \warnpsql CommandsPG18\warn text [ ... ] This command is identical to \echo except that the output will be written to psql's standard error channel, rather than standard output.psql › Usage › Meta-Commands \watchpsql CommandsPG18\watch [ i[nterval]=seconds ] [ c[ount]=times ] [ m[in_rows]=rows ] [ seconds ] Repeatedly execute the current query buffer (as \g does) until interrupted, or the query fails, or the executi…psql › Usage › Meta-Commands \xpsql CommandsPG18\x [ on | off | auto ] Sets or toggles expanded table formatting mode. As such it is equivalent to \pset expanded.psql › Usage › Meta-Commands \zpsql CommandsPG18\z[Sx] [ pattern ] Lists tables, views and sequences with their associated access privileges. If a pattern is specified, only tables, views and sequences whose names match the pattern are li…psql › Usage › Meta-Commands

Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.

pg17: choose a version ex: extensions only select open