From: | PG Doc comments form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Cc: | andy(dot)bolstridge(at)gmail(dot)com |
Subject: | caes insensitivity |
Date: | 2020-04-17 16:47:20 |
Message-ID: | 158714204000.25700.10626536768502518218@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/12/sql-syntax-lexical.html
Description:
The docs are misleading about the case insensitive nature, as someone new to
postgresql, I found it very confusing.
The doc (under 4.1.1. Identifiers and Key Words) says:
UPDATE MY_TABLE SET A = 5; can equivalently be written as: uPDaTE my_TabLE
SeT a = 5;
However, this will never work unless the underlying table is created in
lower case. The "case insensitivity" appears to make everything in the query
lowercase. This is not the same thing as being case insensitive.
so if I have a table created as My_Table, I can *only* access it by quoting
it. 'Select * from my_table' does not work, nor does 'Select * from
MY_TABLE', and nor does the expected 'Select * from My_Table'.
If the query was case insensitive, it should still work, finding the
underlying table regardless of its case. But as this obviously does not
work, it should not be documented as such.
Instead the reality of the system should be documented - that all queries
are turned into lower case and the lower-case transformation is run, unless
the text is explicitly quoted.
From | Date | Subject | |
---|---|---|---|
Next Message | Jürgen Purtz | 2020-04-17 17:56:08 | Additional Chapter for Tutorial |
Previous Message | Jonathan S. Katz | 2020-04-17 12:57:21 | Re: PDF documentation bug: different table columns overlap and are unreadable |