caes insensitivity

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема caes insensitivity
Дата
Msg-id 158714204000.25700.10626536768502518218@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: caes insensitivity  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список 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.

В списке pgsql-docs по дате отправления:

Предыдущее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: PDF documentation bug: different table columns overlap and areunreadable
Следующее
От: Jürgen Purtz
Дата:
Сообщение: Additional Chapter for Tutorial