Re: BUG #18619: uppercase column with quotation marks, gets an error without quotation marks
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: "gcso@sqliteonline.com" <gcso@sqliteonline.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2024-09-16T13:29:21Z
Lists: pgsql-bugs
On Monday, September 16, 2024, PG Bug reporting form <noreply@postgresql.org> wrote: > The following bug has been logged on the website: > > Bug reference: 18619 > Logged by: Kirill N > Email address: gcso@sqliteonline.com > PostgreSQL version: 17rc1 > Operating system: docker 17rc1 > Description: > > Hello, > > If you create a table with field names in uppercase and put them in > quotation marks. > then such fields can be accessed only with quotation marks. > > table_schema | table_name | column_name | data_type > --------------+------------+---------------+------------------- > public | a | b | integer > public | a | C | integer > > You are compelled to use quote_ident (or format code I) if you want to interpolate stored identifiers into SQL where case-folding happens. But the quoting is purely a SQL syntax artifact, the identifier itself does not include the syntax quotes as part of its value. David J.