Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Popular entries9761
ArgumentsArguments
Portal portal portal containing the cursor FetchDirection direction one of FETCH_FORWARD, FETCH_BACKWARD, FETCH_ABSOLUTE or FETCH_RELATIVE long count number of rows to fetch for FE…Arguments
ArgumentsArguments
Portal portal portal containing the cursor FetchDirection direction one of FETCH_FORWARD, FETCH_BACKWARD, FETCH_ABSOLUTE or FETCH_RELATIVE long count number of rows to move for FET…Arguments
ArgumentsArguments
const char * name the relation registry entry nameArguments
Arguments for SQL Functions36.5.1. Arguments for SQL Functions
Arguments of an SQL function can be referenced in the function body using either names or numbers. Examples of both methods appear below.
To use a name, d…Arguments for SQL Functions
armor(), dearmor()F.26.3.6. armor(), dearmor()
armor(data bytea [ , keys text[], values text[] ]) returns text dearmor(data text) returns bytea
These functions wrap/unwrap binary data into PGP ASCII-armor for…armor(), dearmor()
Array Constructors4.2.12. Array Constructors
An array constructor is an expression that builds an array value using values for its member elements. A simple array constructor consists of the key word ARRAY, a…Array Constructors
Array Functions and Operators9.19. Array Functions and Operators
Table 9.56 shows the specialized operators available for array types. In addition to those, the usual comparison operators shown in Table 9.1 are availabl…Array Functions and Operators
Array Input and Output Syntax8.15.6. Array Input and Output Syntax
The external text representation of an array value consists of items that are interpreted according to the I/O conversion rules for the array's element …Array Input and Output Syntax
Array TypesArray Types
Whenever a user-defined type is created, PostgreSQL automatically creates an associated array type, whose name consists of the element type's name prepended with an underscore, a…Array Types
Array Value Input8.15.2. Array Value Input
To write an array value as a literal constant, enclose the element values within curly braces and separate them by commas. (If you know C, this is not unlike the C …Array Value Input
array_aggarray_agg
Aggregate Functions
10
input values, including nulls, concatenated into an array
array_agg ( expression ) → array of the argument type input values, including nulls, concatenated i…Functions · Aggregate Functions
array_appendarray_append
Array Functions And Operators
10
append an element to the end of an array
array_append ( anyarray, anyelement ) → anyarray append an element to the end of an array
11
12
13
Appe…Functions · Array Functions And Operators
array_catarray_cat
Array Functions And Operators
10
concatenate two arrays
array_cat ( anyarray, anyarray ) → anyarray concatenate two arrays
11
12
13
Concatenates two arrays (same as the anyarray ||…Functions · Array Functions And Operators
array_concataggregates and functions for PostgreSQL Server
aggregates c custom-aggregates extension functions postgresql postgresql-extension
array_concat
Functions and aggregatesFunctions and aggregates · Extensions
array_dimsarray_dims
Array Functions And Operators
10
returns a text representation of array's dimensions
array_dims ( anyarray ) → text returns a text representation of array's dimensions
11
12
13
Re…Functions · Array Functions And Operators
array_fillarray_fill
Array Functions And Operators
10
returns an array initialized with supplied value and dimensions, optionally with lower bounds other than 1
array_fill ( anyelement, int[] [, int[]…Functions · Array Functions And Operators
array_lengtharray_length
Array Functions And Operators
10
returns the length of the requested array dimension
array_length ( anyarray, int ) → int returns the length of the requested array dimension
11
…Functions · Array Functions And Operators
array_lowerarray_lower
Array Functions And Operators
10
returns lower bound of the requested array dimension
array_lower ( anyarray, int ) → int returns lower bound of the requested array dimension
11
…Functions · Array Functions And Operators
array_ndimsarray_ndims
Array Functions And Operators
10
returns the number of dimensions of the array
array_ndims ( anyarray ) → int returns the number of dimensions of the array
11
12
13
Returns the n…Functions · Array Functions And Operators
array_nullsarray_nulls
Version and Platform Compatibility
10
This controls whether the array input parser recognizes unquoted NULL as specifying a null array element. By default, this is on, allowing a…Configuration · Version and Platform Compatibility
array_positionarray_position
Array Functions And Operators
10
returns the subscript of the first occurrence of the second argument in the array, starting at the element indicated by the third argument or …Functions · Array Functions And Operators
array_positionsarray_positions
Array Functions And Operators
10
returns an array of subscripts of all occurrences of the second argument in the array given as first argument (array must be one-dimensional)…Functions · Array Functions And Operators
array_prependarray_prepend
Array Functions And Operators
10
append an element to the beginning of an array
array_prepend ( anyelement, anyarray ) → anyarray append an element to the beginning of an array…Functions · Array Functions And Operators
array_removearray_remove
Array Functions And Operators
10
remove all elements equal to the given value from the array (array must be one-dimensional)
array_remove ( anyarray, anyelement ) → anyarray rem…Functions · Array Functions And Operators
array_replacearray_replace
Array Functions And Operators
10
replace each array element equal to the given value with a new value
array_replace ( anyarray, anyelement, anyelement ) → anyarray replace each…Functions · Array Functions And Operators
array_reversearray_reverse
Array Functions And Operators
18
Reverses the first dimension of the array.
array_reverse ( anyarray ) → anyarray Reverses the first dimension of the array.
19
20Functions · Array Functions And Operators
array_samplearray_sample
Array Functions And Operators
16
Returns an array of n items randomly selected from array. n may not exceed the length of array's first dimension. If array is multi-dimensional,…Functions · Array Functions And Operators
array_shufflearray_shuffle
Array Functions And Operators
16
Randomly shuffles the first dimension of the array.
array_shuffle ( anyarray ) → anyarray Randomly shuffles the first dimension of the array.
1…Functions · Array Functions And Operators
array_sortarray_sort
Array Functions And Operators
18
Sorts the first dimension of the array. The sort order is determined by the default sort ordering of the array's element type; however, if the ele…Functions · Array Functions And Operators
array_textsortC functions for sorting and de-duplicating one-dimensional text arrays.
array deduplication sorting
array_textsort
Functions and aggregatesFunctions and aggregates · Extensions
array_to_jsonarray_to_json
Json Functions And Operators
10
Returns the array as a JSON array. A PostgreSQL multidimensional array becomes a JSON array of arrays. Line feeds will be added between dimensio…Functions · Json Functions And Operators
array_to_stringarray_to_string
Array Functions And Operators
10
concatenates array elements using supplied delimiter and optional null string
array_to_string ( anyarray, text [, text] ) → text concatenates…Functions · Array Functions And Operators
array_to_tsvectorarray_to_tsvector
Text Search Functions And Operators
10
convert array of lexemes to tsvector
array_to_tsvector ( text[] ) → tsvector convert array of lexemes to tsvector
11
12
13
Converts a…Functions · Text Search Functions And Operators
array_upperarray_upper
Array Functions And Operators
10
returns upper bound of the requested array dimension
array_upper ( anyarray, int ) → int returns upper bound of the requested array dimension
11
…Functions · Array Functions And Operators
arraymathArray math and operators that work element by element on the contents of arrays
pg_arraymath
Functions and aggregatesFunctions and aggregates · Extensions
Arrays8.15. Arrays
PostgreSQL allows columns of a table to be defined as variable-length multidimensional arrays. Arrays of any built-in or user-defined base type, enum type, composite type, range…Arrays
Arrays34.4.4.3.1. Arrays
There are two use cases for arrays as host variables. The first is a way to store some text string in char[] or VARCHAR[], as explained in Section 34.4.4.1. The second use…Arrays
Arrays34.4.5.1. Arrays
Multi-dimensional SQL-level arrays are not directly supported in ECPG. One-dimensional SQL-level arrays can be mapped into C array host variables and vice-versa. However, wh…Arrays
Arrays, Lists44.2.3. Arrays, Lists
SQL array values are passed into PL/Python as a Python list. To return an SQL array value out of a PL/Python function, return a Python list:
CREATE FUNCTION return_arr(…Arrays, Lists
ASOmitting the AS Key Word In the SQL standard, the optional key word AS can be omitted before an output column name whenever the new column name is a valid column name (that is, not the same …SELECT › Compatibility › Omitting the AS Key Word
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open