DECOMPOSE
Example
Section titled “Example”DO $$DECLARE uname name;BEGIN uname := DECOMPOSE('n\u0303'); RAISE NOTICE 'Decomposed String: %', uname;END $$;Output
Section titled “Output”NOTICE: Decomposed String: ñExplanation
Section titled “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.