Contents
upper()
A system function for converting a string to upper case
upper()
is a system function for converting a string to upper case, in accordance with the database's locale setting.<
upper()
was added in PostgreSQL 6.1.
Examples
Basic usage of upper()
:
postgres=# SELECT upper('foo BAR Baz'); upper ------------- FOO BAR BAZ (1 row)
Locale-specific upper casing:
tr_test=# SHOW lc_collate; lc_collate ------------ tr_TR.utf8 (1 row) tr_test=# SELECT upper('ıi'); upper ------- Iİ (1 row)
upper()
is ineffective in scripts where there is no concept of case:
postgres=# SELECT upper('ほげホゲ'); upper ---------- ほげホゲ (1 row)
References
- PostgreSQL documentation: SQL String Functions and Operators