model-writtenrun 7916 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Pavel Stehule proposed a built-in function to decode Unicode escapes in text values, avoiding the need to construct SQL string literals dynamically #1, and submitted unicode_unescape with an optional escape character #2.
- Daniel Gustafsson caught an incorrect Oid return type on a helper that returned no value #3, which Pavel corrected #4.
- Asif Rehman requested support for the u-prefixed escapes motivating the proposal #5; Pavel added both u and U forms and error tests #6, and Asif reported successful testing and marked the patch ready for a committer #7.
- After Pavel rebased the patch #8, Peter Eisentraut questioned its use case and requested a precise format specification #9 #11; Pavel described escaped Unicode in corporate CSV data and explored encoding conversions and more general text conversion functions #10 #12 #13 #14.
- Chapman Flack highlighted differences between RTF, Java and Python escapes and their handling of non-BMP characters #15 #22, while Andrew Dunstan questioned inclusion in core and Pavel defended a safe built-in function accessible to hosted-database users #17 #18 #21.
- Peter suggested aligning with Oracle's unistr #19; Pavel adopted that name and removed the optional escape argument while preserving the existing four escape forms #24, leaving the broader conversion proposals and Chapman's suggested programmable replacement mechanism unimplemented #22.
- Peter later supported the revised functionality #27 and committed f37fec837c from #24, using local decoding helpers and revised diagnostics and moving tests to strings.sql because the feature was not restricted to UTF-8 databases #28.
- The thread ended with Pavel's thanks #29; the unistr feature had landed, with broader helper refactoring explicitly deferred by Peter #28.