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

Popular entries9756
==FunctionsPG18value == value → boolean Equality comparison (this, and the other comparison operators, work on all JSON scalar values) jsonb_path_query_array('[1, "a", 1, 3]', '$[*] ? (@ == 1)') → [1, 1] j…JSON Functions and Operators › The SQL/JSON Path Language › SQL/JSON Path Operators and Methods >FunctionsPG18json #> text[] → json jsonb #> text[] → jsonb Extracts JSON sub-object at the specified path, where path elements can be either field keys or array indexes. '{"a": {"b": ["foo","bar"]}}'::js…JSON Functions and Operators › Processing and Creating JSON Data >=FunctionsPG18value >= value → boolean Greater-than-or-equal-to comparison jsonb_path_query_array('[1, 2, 3]', '$[*] ? (@ >= 2)') → [2, 3]JSON Functions and Operators › The SQL/JSON Path Language › SQL/JSON Path Operators and Methods >>FunctionsPG18bit >> integer → bit Bitwise shift right (string length is preserved) B'10001' >> 2 → 00100Bit String Functions and Operators >>=FunctionsPG18inet >>= inet → boolean Does subnet contain or equal subnet? inet '192.168.1/24' >>= inet '192.168.1/24' → tNetwork Address Functions and Operators >^FunctionsPG18box >^ box → boolean Is first object above second (allows edges to touch)? box '((2,2),(1,1))' >^ box '((1,1),(0,0))' → tGeometric Functions and Operators ?FunctionsPG18geometric_type ?# geometric_type → boolean Do these objects intersect? Available for these pairs of types: (box, box), (lseg, box), (lseg, lseg), (lseg, line), (line, box), (line, line), (pa…Geometric Functions and Operators ?&FunctionsPG18jsonb ?& text[] → boolean Do all of the strings in the text array exist as top-level keys or array elements? '["a", "b", "c"]'::jsonb ?& array['a', 'b'] → tJSON Functions and Operators › Processing and Creating JSON Data ?-FunctionsPG18?- line → boolean ?- lseg → boolean Is line horizontal? ?- lseg '[(-1,0),(1,0)]' → tGeometric Functions and Operators ?-|FunctionsPG18line ?-| line → boolean lseg ?-| lseg → boolean Are lines perpendicular? lseg '[(0,0),(0,1)]' ?-| lseg '[(0,0),(1,0)]' → tGeometric Functions and Operators ?<@FunctionsPG18ltree[] ?<@ ltree → ltree Returns first array entry that is a descendant of ltree, or NULL if none.ltree — hierarchical tree-like data type › Operators and Functions ?@FunctionsPG18ltree[] ?@ ltxtquery → ltree Returns first array entry that matches ltxtquery, or NULL if none.ltree — hierarchical tree-like data type › Operators and Functions ?@>FunctionsPG18ltree[] ?@> ltree → ltree Returns first array entry that is an ancestor of ltree, or NULL if none.ltree — hierarchical tree-like data type › Operators and Functions ?|FunctionsPG18?| line → boolean ?| lseg → boolean Is line vertical? ?| lseg '[(-1,0),(1,0)]' → fGeometric Functions and Operators ?||FunctionsPG18line ?|| line → boolean lseg ?|| lseg → boolean Are lines parallel? lseg '[(-1,0),(1,0)]' ?|| lseg '[(-1,2),(1,2)]' → tGeometric Functions and Operators ?~FunctionsPG18ltree[] ?~ lquery → ltree Returns first array entry that matches lquery, or NULL if none.ltree — hierarchical tree-like data type › Operators and Functions @FunctionsPG18@ numeric_type → numeric_type Absolute value @ -5.0 → 5.0Mathematical Functions and Operators @-@FunctionsPG18@-@ geometric_type → double precision Computes the total length. Available for lseg, path. @-@ path '[(0,0),(1,0),(1,1)]' → 2Geometric Functions and Operators @>FunctionsPG18cube @> cube → boolean Does the first cube contain the second?cube — a multi-dimensional cube data type › Usage @?FunctionsPG18jsonb @? jsonpath → boolean Does JSON path return any item for the specified JSON value? (This is useful only with SQL-standard JSON path expressions, not predicate check expressions, since …JSON Functions and Operators › Processing and Creating JSON Data @@FunctionsPG18@@ geometric_type → point Computes the center point. Available for box, lseg, polygon, circle. @@ box '(2,2),(0,0)' → (1,1)Geometric Functions and Operators \!psql CommandsPG18\! [ command ] With no argument, escapes to a sub-shell; psql resumes when the sub-shell exits. With an argument, executes the shell command command. Unlike most other meta-commands, the ent…psql › Usage › Meta-Commands \;psql CommandsPG18\; Backslash-semicolon is not a meta-command in the same way as the preceding commands; rather, it simply causes a semicolon to be added to the query buffer without any further processing. N…psql › Usage › Meta-Commands \?psql CommandsPG18\? [ topic ] Shows help information. The optional topic parameter (defaulting to commands) selects which part of psql is explained: commands describes psql's backslash commands; options desc…psql › Usage › Meta-Commands \Cpsql CommandsPG18\C [ title ] Sets the title of any tables being printed as the result of a query or unset any such title. This command is equivalent to \pset title title. (The name of this command derives f…psql › Usage › Meta-Commands \Hpsql CommandsPG18\H or \html Turns on HTML query output format. If the HTML format is already on, it is switched back to the default aligned text format. This command is for compatibility and convenience, bu…psql › Usage › Meta-Commands \Tpsql CommandsPG18\T table_options Specifies attributes to be placed within the table tag in HTML output format. This command is equivalent to \pset tableattr table_options.psql › Usage › Meta-Commands \apsql CommandsPG18\a If the current table output format is unaligned, it is switched to aligned. If it is not unaligned, it is set to unaligned. This command is kept for backwards compatibility. See \pset for…psql › Usage › Meta-Commands \bindpsql CommandsPG18\bind [ parameter ] ... Sets query parameters for the next query execution, with the specified parameters passed for any parameter placeholders ($1 etc.). Example: INSERT INTO tbl1 VALUES ($…psql › Usage › Meta-Commands \cpsql CommandsPG18\c or \connect [ -reuse-previous=on|off ] [ dbname [ username ] [ host ] [ port ] | conninfo ] Establishes a new connection to a PostgreSQL server. The connection parameters to use can be sp…psql › Usage › Meta-Commands \cdpsql CommandsPG18\cd [ directory ] Changes the current working directory to directory. Without argument, changes to the current user's home directory. For details on how home directories are found, see Secti…psql › Usage › Meta-Commands \closepsql CommandsPG18\close_prepared prepared_statement_name Closes the specified prepared statement. An empty string denotes the unnamed prepared statement. If no prepared statement exists with this name, the o…psql › Usage › Meta-Commands \conninfopsql CommandsPG18\conninfo Outputs information about the current database connection, including SSL-related information if SSL is in use. Note that the Client User field shows the user at the time of connect…psql › Usage › Meta-Commands \copypsql CommandsPG18\copy { table [ ( column_list ) ] } from { 'filename' | program 'command' | stdin | pstdin } [ [ with ] ( option [, ...] ) ] [ where condition ]\copy { table [ ( column_list ) ] | ( query ) …psql › Usage › Meta-Commands \copyrightpsql CommandsPG18\copyright Shows the copyright and distribution terms of PostgreSQL.psql › Usage › Meta-Commands \crosstabviewpsql CommandsPG18\crosstabview [ colV [ colH [ colD [ sortcolH ] ] ] ] Executes the current query buffer (like \g) and shows the results in a crosstab grid. The query must return at least three columns. The …psql › Usage › Meta-Commands \dApsql CommandsPG18\dA[x+] [ pattern ] Lists access methods. If pattern is specified, only access methods whose names match the pattern are shown. If x is appended to the command name, the results are displaye…psql › Usage › Meta-Commands \dAcpsql CommandsPG18\dAc[x+] [access-method-pattern [input-type-pattern]] Lists operator classes (see Section 36.16.1). If access-method-pattern is specified, only operator classes associated with access method…psql › Usage › Meta-Commands \dAfpsql CommandsPG18\dAf[x+] [access-method-pattern [input-type-pattern]] Lists operator families (see Section 36.16.5). If access-method-pattern is specified, only operator families associated with access meth…psql › Usage › Meta-Commands \dAopsql CommandsPG18\dAo[x+] [access-method-pattern [operator-family-pattern]] Lists operators associated with operator families (see Section 36.16.2). If access-method-pattern is specified, only members of ope…psql › Usage › Meta-Commands
More results

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

pg17: choose a version ex: extensions only select open