DECOMPOSE
DECOMPOSE in SQL is a function utilized to split a composite column into its component elements. It is commonly used in operations involving multicolumn keys or records.
Example
Output
Explanation
The provided SQL script uses PostgreSQL’s DO language to declare a variable and assign to it the decomposed Unicode string. In the BEGIN block, the predefined DECOMPOSE function is used to split the character ‘ñ’ into its constituent parts: ‘n’ and the combining tilde ‘̃’. The result is then displayed with the RAISE NOTICE command. The output shows the decomposed string.