lower()

A system function for converting a string to lower case

lower() is a system function for converting a string to lower case, in accordance with the database's locale setting.

lower() was added in PostgreSQL 6.1.

Usage

lower ( text ) → text

Change history

Examples

Basic usage of lower():

postgres=# SELECT lower('foo BAR Baz');
    lower
-------------
 foo bar baz
(1 row)

Locale-specific lower casing:

tr_test=# SHOW lc_collate;
 lc_collate
------------
 tr_TR.utf8
(1 row)

tr_test=# SELECT lower('Iİ');
 lower
-------
 ıi
(1 row)

lower() is ineffective in scripts where there is no concept of case:

postgres=# SELECT lower('ほげホゲ');
  lower
----------
 ほげホゲ
(1 row)

Categories

String manipulation, System function

See also

upper(), initcap()