Function Reference

UPPER

Converts all letters of a string to upper case.

PostgreSQL 17.5
UPPER(string)

Parameters

stringtext
Source string

Return value

A string in upper case by the rules of the database locale, including Cyrillic

Examples

String in uppercase

PostgreSQL 17.5
SELECT UPPER('привет, postgresql');
upper
ПРИВЕТ, POSTGRESQL

Names in uppercase

PostgreSQL 17.5
SELECT member_name,
	UPPER(member_name) AS upper_name
FROM FamilyMembers;
member_nameupper_name
Headley QuinceyHEADLEY QUINCEY
Flavia QuinceyFLAVIA QUINCEY
Andie QuinceyANDIE QUINCEY
Lela QuinceyLELA QUINCEY
Annie QuinceyANNIE QUINCEY
Ernest ForrestERNEST FORREST
Constance ForrestCONSTANCE FORREST
Wednesday AddamsWEDNESDAY ADDAMS

Details

To compare strings ignoring case, convert both sides to the same case: WHERE UPPER(member_name) = UPPER('andie quincey'). For case-insensitive pattern matching there is the ILIKE operator.

See also

Where to learn