pgsql: Add unistr function

Started by Peter Eisentrautabout 5 years ago3 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Add unistr function

This allows decoding a string with Unicode escape sequences. It is
similar to Unicode escape strings, but offers some more flexibility.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reviewed-by: Asif Rehman <asifr.rehman@gmail.com>
Discussion: /messages/by-id/CAFj8pRA5GnKT+gDVwbVRH2ep451H_myBt+NTz8RkYUARE9+qOQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f37fec837ce8bf7af408ba66d32099e5a0182402

Modified Files
--------------
doc/src/sgml/func.sgml | 46 ++++++++
src/backend/utils/adt/varlena.c | 210 ++++++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 4 +
src/test/regress/expected/strings.out | 36 ++++++
src/test/regress/sql/strings.sql | 13 +++
6 files changed, 310 insertions(+), 1 deletion(-)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: pgsql: Add unistr function

Peter Eisentraut <peter@eisentraut.org> writes:

Add unistr function

This has had negative consequences for PDF docs builds:

[WARN] FOUserAgent - Glyph "?" (0x441, afii10083) not available in font "Courier".
[WARN] FOUserAgent - Glyph "?" (0x43b, afii10077) not available in font "Courier".
[WARN] FOUserAgent - Glyph "?" (0x43e, afii10080) not available in font "Courier".
[WARN] FOUserAgent - Glyph "?" (0x43d, afii10079) not available in font "Courier".

I'm not sure if we have a way to put Cyrillic characters in the
docs, but if we do, this isn't it.

regards, tom lane

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#2)
Re: pgsql: Add unistr function

On 31.03.21 05:31, Tom Lane wrote:

Peter Eisentraut <peter@eisentraut.org> writes:

Add unistr function

This has had negative consequences for PDF docs builds:

[WARN] FOUserAgent - Glyph "?" (0x441, afii10083) not available in font "Courier".
[WARN] FOUserAgent - Glyph "?" (0x43b, afii10077) not available in font "Courier".
[WARN] FOUserAgent - Glyph "?" (0x43e, afii10080) not available in font "Courier".
[WARN] FOUserAgent - Glyph "?" (0x43d, afii10079) not available in font "Courier".

I'm not sure if we have a way to put Cyrillic characters in the
docs, but if we do, this isn't it.

fixed