postgresql/src/include
Tom Lane a6525588b7 Allow Unicode escapes in any server encoding, not only UTF-8.
SQL includes provisions for numeric Unicode escapes in string
literals and identifiers.  Previously we only accepted those
if they represented ASCII characters or the server encoding
was UTF-8, making the conversion to internal form trivial.
This patch adjusts things so that we'll call the appropriate
encoding conversion function in less-trivial cases, allowing
the escape sequence to be accepted so long as it corresponds
to some character available in the server encoding.

This also applies to processing of Unicode escapes in JSONB.
However, the old restriction still applies to client-side
JSON processing, since that hasn't got access to the server's
encoding conversion infrastructure.

This patch includes some lexer infrastructure that simplifies
throwing errors with error cursors pointing into the middle of
a string (or other complex token).  For the moment I only used
it for errors relating to Unicode escapes, but we might later
expand the usage to some other cases.

Patch by me, reviewed by John Naylor.

Discussion: https://postgr.es/m/2393.1578958316@sss.pgh.pa.us
2020-03-06 14:17:43 -05:00
..
access Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
bootstrap Update copyrights for 2020 2020-01-01 12:21:45 -05:00
catalog Allow ALTER TYPE to change some properties of a base type. 2020-03-06 12:19:29 -05:00
commands Allow ALTER TYPE to change some properties of a base type. 2020-03-06 12:19:29 -05:00
common Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
datatype Update copyrights for 2020 2020-01-01 12:21:45 -05:00
executor Extend ExecBuildAggTrans() to support a NULL pointer check. 2020-03-04 17:29:18 -08:00
fe_utils Reduce size of backend scanner's tables. 2020-01-13 15:04:31 -05:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit jit: Reference expression step functions via llvmjit_types. 2020-02-06 22:29:14 -08:00
lib Skip memcpy(x, x) in qunique(). 2020-01-04 11:31:42 -08:00
libpq Allow building without default socket directory 2020-01-31 16:28:43 +01:00
mb Allow Unicode escapes in any server encoding, not only UTF-8. 2020-03-06 14:17:43 -05:00
nodes Allow ALTER TYPE to change some properties of a base type. 2020-03-06 12:19:29 -05:00
optimizer Save calculated transitionSpace in Agg node. 2020-02-27 11:20:56 -08:00
parser Allow Unicode escapes in any server encoding, not only UTF-8. 2020-03-06 14:17:43 -05:00
partitioning Update copyrights for 2020 2020-01-01 12:21:45 -05:00
port Assume that we have utime() and <utime.h>. 2020-02-21 14:30:47 -05:00
portability Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postmaster Update copyrights for 2020 2020-01-01 12:21:45 -05:00
regex Assume that we have <wchar.h>. 2020-02-21 14:30:47 -05:00
replication Set ReorderBufferTXN->final_lsn more eagerly 2020-01-17 18:00:39 -03:00
rewrite Update copyrights for 2020 2020-01-01 12:21:45 -05:00
snowball Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statistics Update copyrights for 2020 2020-01-01 12:21:45 -05:00
storage Fix page-level checksum calculation in checksum_impl.h 2020-03-06 08:15:29 +09:00
tcop Represent command completion tags as structs 2020-03-02 18:19:51 -03:00
tsearch Assume that we have <wchar.h>. 2020-02-21 14:30:47 -05:00
utils Allow ALTER TYPE to change some properties of a base type. 2020-03-06 12:19:29 -05:00
.gitignore
c.h Assume that we have signed integral types and flexible array members. 2020-02-21 14:30:48 -05:00
fmgr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
funcapi.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
getaddrinfo.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
getopt_long.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
miscadmin.h Make vacuum buffer counters 64 bits wide 2020-02-05 16:59:29 -03:00
pg_config.h.in Move pg_upgrade's Windows link() implementation to AC_REPLACE_FUNCS 2020-03-04 08:22:54 +01:00
pg_config_ext.h.in
pg_config_manual.h Allow building without default socket directory 2020-01-31 16:28:43 +01:00
pg_getopt.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_trace.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pgstat.h Report progress of streaming base backup. 2020-03-03 12:03:43 +09:00
pgtar.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pgtime.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
port.h Move pg_upgrade's Windows link() implementation to AC_REPLACE_FUNCS 2020-03-04 08:22:54 +01:00
postgres.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postgres_ext.h
postgres_fe.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rusagestub.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
windowapi.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00