Re: SQL keywords are suddenly case sensitive

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL keywords are suddenly case sensitive
Дата
Msg-id 13281.1366158204@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SQL keywords are suddenly case sensitive  (Lee Hachadoorian <Lee.Hachadoorian+L@gmail.com>)
Ответы Re: SQL keywords are suddenly case sensitive  (Lee Hachadoorian <Lee.Hachadoorian+L@gmail.com>)
Re: SQL keywords are suddenly case sensitive  (Lee Hachadoorian <Lee.Hachadoorian+L@gmail.com>)
Список pgsql-general
Lee Hachadoorian <Lee.Hachadoorian+L@gmail.com> writes:
> SQL seems to be behaving in a case-sensitive manner:

> universe=# select 1;
>   ?column?
> ----------
>          1
> (1 row)

> universe=# SELECT 1;
> ERROR:  syntax error at or near "SELECT 1"
> LINE 1: SELECT 1;
>          ^

That's really bizarre, but I don't think it's a case sensitivity problem
as such.  Watch what I get from a syntax error on a normally-functioning
system:

$ psql
psql (9.1.9)
Type "help" for help.

regression=# select 1;
 ?column?
----------
        1
(1 row)

regression=# SELECT 1;
 ?column?
----------
        1
(1 row)

regression=# xELECT 1;
ERROR:  syntax error at or near "xELECT"
LINE 1: xELECT 1;
        ^

See the differences?  The error message indicates that your parser saw
"SELECT 1" as all one token.  Also, if you transcribed this accurately,
it looks like the error cursor is pointing to the second character of
the "SELECT" not the first (could you confirm that?).  Which is even
more bizarre.  I'm not sure what's going on, but I think it's more
likely to be something to do with whitespace not being really whitespace
than it is with case as such.  Consider the possibility that you're
somehow typing a non-breaking space or some such character.  One thing
that might be useful is to examine the error report in the postmaster
log using an editor that will show you any non-printing characters.

            regards, tom lane


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: SQL keywords are suddenly case sensitive
Следующее
От: Lee Hachadoorian
Дата:
Сообщение: Re: SQL keywords are suddenly case sensitive