Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Category index908
split_partsplit_part
String Functions And Operators
10
Split string on delimiter and return the given field (counting from one)
split_part ( string text, delimiter text, field int ) → text Split strin…Functions · String Functions And Operators
sqrtsqrt
Mathematical Functions And Operators
10
square root
sqrt ( dp or numeric ) → (same as input) square root
11
12
13
Square root
sqrt ( numeric ) → numeric Square root
sqrt ( double precis…Functions · Mathematical Functions And Operators
starts_withstarts_with
String Functions And Operators
11
Returns true if string starts with prefix.
starts_with ( string, prefix ) → bool Returns true if string starts with prefix.
12
13
starts_with ( …Functions · String Functions And Operators
statement_timestampstatement_timestamp
Date/Time Functions And Operators
10
Current date and time (start of current statement); see Section 9.9.4
statement_timestamp ( ) → timestamp with time zone Current date…Functions · Date/Time Functions And Operators
stddevstddev
Aggregate Functions
10
historical alias for stddev_samp
stddev ( expression ) → double precision for floating-point arguments, otherwise numeric historical alias for stddev_samp
11
12…Functions · Aggregate Functions
stddev_popstddev_pop
Aggregate Functions
10
population standard deviation of the input values
stddev_pop ( expression ) → double precision for floating-point arguments, otherwise numeric population st…Functions · Aggregate Functions
stddev_sampstddev_samp
Aggregate Functions
10
sample standard deviation of the input values
stddev_samp ( expression ) → double precision for floating-point arguments, otherwise numeric sample standard…Functions · Aggregate Functions
strict_word_similaritystrict_word_similarity ( text, text ) → real Same as word_similarity, but forces extent boundaries to match word boundaries. Since we don't have cross-word trigrams, this function actually r…pg_trgm — support for similarity of text using trigram matching › Functions and Operators
string_aggstring_agg
Aggregate Functions
10
non-null input values concatenated into a string, separated by delimiter
string_agg ( expression, delimiter ) → same as argument types non-null input values…Functions · Aggregate Functions
string_to_arraystring_to_array
String Functions And Operators
10
splits string into array elements using supplied delimiter and optional null string
string_to_array ( text, text [, text] ) → text[] splits …Functions · String Functions And Operators
string_to_tablestring_to_table
String Functions And Operators
14
Splits the string at occurrences of delimiter and returns the resulting fields as a set of text rows. If delimiter is NULL, each character i…Functions · String Functions And Operators
stripstrip
Text Search Functions And Operators
10
remove positions and weights from tsvector
strip ( tsvector ) → tsvector remove positions and weights from tsvector
11
12
13
Removes positions an…Functions · Text Search Functions And Operators
strposstrpos
String Functions And Operators
10
Location of specified substring (same as position(substring in string), but note the reversed argument order)
strpos ( string, substring ) → int Loca…Functions · String Functions And Operators
subarraysubarray ( integer[], start integer, len integer ) → integer[] Extracts the portion of the array starting at position start, with len elements. subarray('{1,2,3,2,1}'::integer[], 2, 3) → {2,…intarray — manipulate arrays of integers › intarray Functions and Operators
subltreesubltree ( ltree, start integer, end integer ) → ltree Returns subpath of ltree from position start to position end-1 (counting from 0). subltree('Top.Child1.Child2', 1, 2) → Child1ltree — hierarchical tree-like data type › Operators and Functions
subpathsubpath ( ltree, offset integer, len integer ) → ltree Returns subpath of ltree starting at position offset, with length len. If offset is negative, subpath starts that far from the end of t…ltree — hierarchical tree-like data type › Operators and Functions
substrsubstr
String Functions And Operators
10
Extract substring (same as substring(string from from for count))
substr ( string, from [, count] ) → text Extract substring (same as substring(strin…Functions · String Functions And Operators
substringsubstring
String Functions And Operators
10
Extract substring
substring ( string [from int] [for int] ) → text Extract substring
substring ( string from pattern ) → text Extract substring ma…Functions · String Functions And Operators
sumsum
Aggregate Functions
10
sum of expression across all non-null input values
sum ( expression ) → bigint for smallint or int arguments, numeric for bigint arguments, otherwise the same as t…Functions · Aggregate Functions
suppress_redundant_updates_triggersuppress_redundant_updates_trigger
Trigger Functions
10
Currently PostgreSQL provides one built in trigger function, suppress_redundant_updates_trigger, which will prevent any update that do…Functions · Trigger Functions
svalssvals ( hstore ) → setof text Extracts an hstore's values as a set. svals('a=>1,b=>2') → 1 2hstore — hstore key/value datatype › hstore Operators and Functions
system_usersystem_user
System Information Functions And Operators
16
Returns the authentication method and the identity (if any) that the user presented during the authentication cycle before they were…Functions · System Information Functions And Operators
table_to_xmltable_to_xml
Xml Functions
10
The return type of each function is xml.
table_to_xml(tbl regclass, nulls boolean, tableforest boolean, targetns text) The return type of each function is xml.
…Functions · Xml Functions
table_to_xml_and_xmlschematable_to_xml_and_xmlschema
Xml Functions
10
In addition, the following functions are available to produce analogous mappings of entire schemas or the entire current database:
table_to_xml_an…Functions · Xml Functions
table_to_xmlschematable_to_xmlschema
Xml Functions
10
It is essential that the same parameters are passed in order to obtain matching XML data mappings and XML Schema documents.
table_to_xmlschema(tbl regclas…Functions · Xml Functions
tantan
Mathematical Functions And Operators
10
tangent
tan ( x ) tangent
11
12
13
Tangent, argument in radians
tan ( double precision ) → double precision Tangent, argument in radians
14
15
16
…Functions · Mathematical Functions And Operators
tandtand
Mathematical Functions And Operators
10
tangent
tand ( x ) tangent
11
12
13
Tangent, argument in degrees
tand ( double precision ) → double precision Tangent, argument in degrees
14
15
…Functions · Mathematical Functions And Operators
tanhtanh
Mathematical Functions And Operators
12
hyperbolic tangent
tanh ( x ) hyperbolic tangent
13
Hyperbolic tangent
tanh ( double precision ) → double precision Hyperbolic tangent
14
15
16
1…Functions · Mathematical Functions And Operators
texttext
Network Address Functions And Operators
10
extract IP address and netmask length as text
text ( inet ) → text extract IP address and netmask length as text
11
12
13
Returns the unabbrev…Functions · Network Address Functions And Operators
text2ltreetext2ltree ( text ) → ltree Casts text to ltree.ltree — hierarchical tree-like data type › Operators and Functions
tid_blocktid_block
Tid Functions
19
Extracts the block number from a tuple identifier.
tid_block ( tid ) → bigint Extracts the block number from a tuple identifier.
20Functions · Tid Functions
tid_offsettid_offset
Tid Functions
19
Extracts the tuple offset within the block from a tuple identifier.
tid_offset ( tid ) → integer Extracts the tuple offset within the block from a tuple identifie…Functions · Tid Functions
timeofdaytimeofday
Date/Time Functions And Operators
10
Current date and time (like clock_timestamp, but as a text string); see Section 9.9.4
timeofday ( ) → text Current date and time (like clock_ti…Functions · Date/Time Functions And Operators
to_asciito_ascii
String Functions And Operators
10
Convert string to ASCII from another encoding (only supports conversion from LATIN1, LATIN2, LATIN9, and WIN1250 encodings)
to_ascii ( string text …Functions · String Functions And Operators
to_binto_bin
String Functions And Operators
17
Converts the number to its equivalent two's complement binary representation.
to_bin ( integer ) → text Converts the number to its equivalent two's c…Functions · String Functions And Operators
to_charto_char
Data Type Formatting Functions
10
convert time stamp to string
to_char ( timestamp, text ) → text convert time stamp to string
to_char ( interval, text ) → text convert interval to s…Functions · Data Type Formatting Functions
to_dateto_date
Data Type Formatting Functions
10
convert string to date
to_date ( text, text ) → date convert string to date
11
12
13
Converts string to date according to the given format.
to_date …Functions · Data Type Formatting Functions
to_hexto_hex
String Functions And Operators
10
Convert number to its equivalent hexadecimal representation
to_hex ( number int or bigint ) → text Convert number to its equivalent hexadecimal repre…Functions · String Functions And Operators
to_jsonto_json
Json Functions And Operators
10
Returns the value as json or jsonb. Arrays and composites are converted (recursively) to arrays and objects; otherwise, if there is a cast from the ty…Functions · Json Functions And Operators
to_jsonbto_jsonb
Json Functions And Operators
10
Returns the value as json or jsonb. Arrays and composites are converted (recursively) to arrays and objects; otherwise, if there is a cast from the t…Functions · Json Functions And Operators
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open