Skip to content

DECOMPOSE

DO $$
DECLARE
uname name;
BEGIN
uname := DECOMPOSE('n\u0303');
RAISE NOTICE 'Decomposed String: %', uname;
END $$;
NOTICE: Decomposed String: ñ

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.