Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Category index908
lengthlength
String Functions And Operators
10
Number of characters in string
length ( string ) → int Number of characters in string
length ( string bytea, encoding name ) → int Number of characte…Functions · String Functions And Operators
lgammalgamma
Mathematical Functions And Operators
18
Natural logarithm of the absolute value of the gamma function
lgamma ( double precision ) → double precision Natural logarithm of the absolute …Functions · Mathematical Functions And Operators
lineline
Geometric Functions And Operators
10
points to line
line ( point, point ) → line points to line
11
12
13
Converts two points to the line through them.
line ( point, point ) → line Conve…Functions · Geometric Functions And Operators
ll_to_earthll_to_earth ( float8, float8 ) → earth Returns the location of a point on the surface of the Earth given its latitude (argument 1) and longitude (argument 2) in degrees.earthdistance — calculate great-circle distances › Cube-Based Earth Distances
lnln
Mathematical Functions And Operators
10
natural logarithm
ln ( dp or numeric ) → (same as input) natural logarithm
11
12
13
Natural logarithm
ln ( numeric ) → numeric Natural logarithm
ln…Functions · Mathematical Functions And Operators
lo_from_bytealo_from_bytea ( loid oid, data bytea ) → oid Creates a large object and stores data in it. If loid is zero then the system will choose a free OID, otherwise that OID is used (with an error i…Server-Side Functions
lo_getlo_get ( loid oid [, offset bigint, length integer ] ) → bytea Extracts the large object's contents, or a substring thereof. lo_get(24528, 0, 3) → \xffaaffServer-Side Functions
lo_putlo_put ( loid oid, offset bigint, data bytea ) → void Writes data starting at the given offset within the large object; the large object is enlarged if necessary. lo_put(24528, 1, '\xaa') →Server-Side Functions
localtimelocaltime
Date/Time Functions And Operators
10
Current time of day; see Section 9.9.4
localtime → time Current time of day; see Section 9.9.4
LOCALTIME(precision) CURRENT_TIME and CURRENT_TI…Functions · Date/Time Functions And Operators
localtimestamplocaltimestamp
Date/Time Functions And Operators
10
Current date and time (start of current transaction); see Section 9.9.4
localtimestamp → timestamp Current date and time (start of current…Functions · Date/Time Functions And Operators
loglog
Mathematical Functions And Operators
10
base 10 logarithm
log ( dp or numeric ) → (same as input) base 10 logarithm
log ( b numeric, x numeric ) → numeric logarithm to base b
11
12
13
Ba…Functions · Mathematical Functions And Operators
log10log10
Mathematical Functions And Operators
12
base 10 logarithm
log10 ( dp or numeric ) → (same as input) base 10 logarithm
13
Base 10 logarithm (same as log)
log10 ( numeric ) → numeric Bas…Functions · Mathematical Functions And Operators
longitudelongitude ( earth ) → float8 Returns the longitude in degrees of a point on the surface of the Earth.earthdistance — calculate great-circle distances › Cube-Based Earth Distances
lowerlower
String Functions And Operators
10
Convert string to lower case
lower ( string ) → text Convert string to lower case
lower ( anyrange ) → range's element type lower bound of range
11
12…Functions · String Functions And Operators
lower_inclower_inc
Range/Multirange Functions And Operators
10
is the lower bound inclusive?
lower_inc ( anyrange ) → boolean is the lower bound inclusive?
11
12
13
Is the range's lower bound inclusi…Functions · Range/Multirange Functions And Operators
lower_inflower_inf
Range/Multirange Functions And Operators
10
is the lower bound infinite?
lower_inf ( anyrange ) → boolean is the lower bound infinite?
11
12
13
Is the range's lower bound infinite?…Functions · Range/Multirange Functions And Operators
lpadlpad
String Functions And Operators
10
Fill up the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is trun…Functions · String Functions And Operators
lseglseg
Geometric Functions And Operators
10
box diagonal to line segment
lseg ( box ) → lseg box diagonal to line segment
lseg ( point, point ) → lseg points to line segment
11
12
13
Extracts …Functions · Geometric Functions And Operators
ltree2textltree2text ( ltree ) → text Casts ltree to text.ltree — hierarchical tree-like data type › Operators and Functions
ltrimltrim
String Functions And Operators
10
Remove the longest string containing only characters from characters (a space by default) from the start of string
ltrim ( string text [, characters t…Functions · String Functions And Operators
macaddr8_set7bitmacaddr8_set7bit
Network Address Functions And Operators
10
set 7th bit to one, also known as modified EUI-64, for inclusion in an IPv6 address
macaddr8_set7bit ( macaddr8 ) → macaddr8 set 7…Functions · Network Address Functions And Operators
make_datemake_date
Date/Time Functions And Operators
10
Create date from year, month and day fields
make_date ( year int, month int, day int ) → date Create date from year, month and day fields
11
12…Functions · Date/Time Functions And Operators
make_intervalmake_interval
Date/Time Functions And Operators
10
Create interval from years, months, weeks, days, hours, minutes and seconds fields
make_interval ( years int DEFAULT 0, months int DEFAULT …Functions · Date/Time Functions And Operators
make_timemake_time
Date/Time Functions And Operators
10
Create time from hour, minute and seconds fields
make_time ( hour int, min int, sec double precision ) → time Create time from hour, minute and…Functions · Date/Time Functions And Operators
make_timestampmake_timestamp
Date/Time Functions And Operators
10
Create timestamp from year, month, day, hour, minute and seconds fields
make_timestamp ( year int, month int, day int, hour int, min int, …Functions · Date/Time Functions And Operators
make_timestamptzmake_timestamptz
Date/Time Functions And Operators
10
Create timestamp with time zone from year, month, day, hour, minute and seconds fields; if timezone is not specified, the current time z…Functions · Date/Time Functions And Operators
make_validmake_valid ( isn ) → isn Clears the invalid-check-digit flag of the value.isn — data types for international standard numbers (ISBN, EAN, UPC, etc.) › Functions and Operators
makeaclitemmakeaclitem
System Information Functions And Operators
12
build an aclitem from input
makeaclitem ( grantee, grantor, privilege, grantable ) → aclitem build an aclitem from input
13
Construc…Functions · System Information Functions And Operators
masklenmasklen
Network Address Functions And Operators
10
extract netmask length
masklen ( inet ) → int extract netmask length
11
12
13
Returns the netmask length in bits.
masklen ( inet ) → intege…Functions · Network Address Functions And Operators
maxmax
Aggregate Functions
10
maximum value of expression across all non-null input values
max ( expression ) → same as argument type maximum value of expression across all non-null input value…Functions · Aggregate Functions
md5md5
String Functions And Operators
10
Calculates the MD5 hash of string, returning the result in hexadecimal
md5 ( string ) → text Calculates the MD5 hash of string, returning the result in …Functions · String Functions And Operators
merge_actionmerge_action
Merge Support Functions
17
Returns the merge action command executed for the current row. This will be 'INSERT', 'UPDATE', or 'DELETE'.
merge_action ( ) → text Returns the merge…Functions · Merge Support Functions
minmin
Aggregate Functions
10
minimum value of expression across all non-null input values
min ( expression ) → same as argument type minimum value of expression across all non-null input value…Functions · Aggregate Functions
min_scalemin_scale
Mathematical Functions And Operators
13
Minimum scale (number of fractional decimal digits) needed to represent the supplied value precisely
min_scale ( numeric ) → integer Minimum…Functions · Mathematical Functions And Operators
modmod
Mathematical Functions And Operators
10
remainder of y/x
mod ( y, x ) → (same as argument types) remainder of y/x
11
12
13
Remainder of y/x; available for smallint, integer, bigint, and …Functions · Mathematical Functions And Operators
modemode
Aggregate Functions
10
returns the most frequent input value (arbitrarily choosing the first one if there are multiple equally-frequent results)
mode ( ) WITHIN GROUP (ORDER BY sort_exp…Functions · Aggregate Functions
multirangemultirange
Range/Multirange Functions And Operators
14
Returns a multirange containing just the given range.
multirange ( anyrange ) → anymultirange Returns a multirange containing just the …Functions · Range/Multirange Functions And Operators
multirange_minus_multimultirange_minus_multi
Range/Multirange Functions And Operators
19
Returns the non-empty multirange(s) remaining after subtracting the second multirange from the first. If the subtraction yi…Functions · Range/Multirange Functions And Operators
mxid_agemxid_age
System Information Functions And Operators
13
Returns the number of multixacts IDs between the supplied multixact ID and the current multixacts counter.
mxid_age ( xid ) → integer R…Functions · System Information Functions And Operators
netmasknetmask
Network Address Functions And Operators
10
construct netmask for network
netmask ( inet ) → inet construct netmask for network
11
12
13
Computes the network mask for the address's ne…Functions · Network Address 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