| From: | PG Doc comments form <noreply(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-docs(at)lists(dot)postgresql(dot)org |
| Cc: | y(dot)saburov(at)gmail(dot)com |
| Subject: | 4.1. Lexical Structure |
| Date: | 2026-08-27 05:14:33 |
| Message-ID: | 178780767380.2606572.13379338852408472630@wrigleys.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/18/sql-syntax-lexical.html
Description:
Why repeat information within the same section?
In Section 4.1.1, “Identifiers and Keywords”:
>> The option with identifiers in quotation marks allows you to include
escaped Unicode characters identified by their code points. This option
begins with U& (an uppercase or lowercase U followed by an ampersand)
immediately before the opening double quotation mark, with no spaces between
them, for example, U&“foo”. (Note that this creates ambiguity regarding the
& operator. To avoid this problem, use spaces around the operator.) Inside
the quotation marks, Unicode characters can be specified in escaped form by
writing a backslash followed by the character’s four-digit hexadecimal code,
or, alternatively, a backslash followed by a plus sign, followed by the
character’s six-digit hexadecimal code. For example, the identifier “data”
can be written as follows:
> U&“d\0061t\+000061”
...
....
This information, along with examples, is also provided in Section 4.1.2.3.
String Constants with Escaped Unicode Characters
>> PostgreSQL also supports another type of string escape syntax that allows
you to specify arbitrary Unicode characters by code point. A Unicode-escaped
string constant begins with U& (an uppercase or lowercase U followed by an
ampersand) immediately before the opening quote, with no spaces between
them, for example, U&“foo”. (Note that this creates ambiguity with the &
operator. To avoid this problem, use spaces around the operator.) Inside the
quotes, Unicode characters can be specified in escaped form by writing a
backslash followed by the four-digit hexadecimal code of the character, or,
alternatively, a backslash followed by a plus sign, followed by the
six-digit hexadecimal code of the character. For example, the string “data”
can be written as follows:
> U&'d\0061t\+000061'
...
....
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Doc comments form | 2026-08-27 06:09:46 | 4.1.2.3. String Constants with Unicode Escapes |
| Previous Message | PG Doc comments form | 2026-08-24 06:54:11 | tutorial |