Description of disallowed characters in quoted identifiers is incomplete

Started by PG Bug reporting form9 months ago3 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/sql-syntax-lexical.html
Description:

Section 4.1.1 of the documentation claims that "Quoted identifiers can
contain any character, except the character with code zero." However
according to line 105 in src/test/isolation/specscanner.l in the PostgreSQL
source code, new line characters are also disallowed.

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: PG Bug reporting form (#1)
Re: Description of disallowed characters in quoted identifiers is incomplete

On Mon, 2025-07-21 at 19:58 +0000, PG Doc comments form wrote:

Page: https://www.postgresql.org/docs/17/sql-syntax-lexical.html
Description:

Section 4.1.1 of the documentation claims that "Quoted identifiers can
contain any character, except the character with code zero." However
according to line 105 in src/test/isolation/specscanner.l in the PostgreSQL
source code, new line characters are also disallowed.

psql (18beta2)
Type "help" for help.

test=> CREATE TABLE "new
line" ();
CREATE TABLE
test=> \dt new*
List of tables
Schema │ Name │ Type │ Owner
═════════╪════════╪═══════╪═════════
laurenz │ new ↵│ table │ laurenz
│ line │ │
laurenz │ newtab │ table │ laurenz
(2 rows)

Yours,
Laurenz Albe

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: Description of disallowed characters in quoted identifiers is incomplete

PG Doc comments form <noreply@postgresql.org> writes:

Section 4.1.1 of the documentation claims that "Quoted identifiers can
contain any character, except the character with code zero." However
according to line 105 in src/test/isolation/specscanner.l in the PostgreSQL
source code, new line characters are also disallowed.

I'm not sure why you would think that specscanner.l is relevant
here. It's for parsing our (rather idiosyncratic) "isolation
test" spec files, not SQL.

regards, tom lane