Bug or feature?

Поиск
Список
Период
Сортировка
Искать

Bug or feature?

От:
Tatsuo Ishii <ishii@sraoss.co.jp>
Дата:
Hi, I can run following odd command(note that no spaces between 1 and
where):

test=# select 1where true;?column? 
----------       1
(1 row)

Is this a bug or a feature? This is PostgreSQL 8.1.0.
--
SRA OSS, Inc. Japan
Tatsuo Ishii

Re: Bug or feature?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Tatsuo Ishii  writes:
> Hi, I can run following odd command(note that no spaces between 1 and
> where):

> test=# select 1where true;

> Is this a bug or a feature? This is PostgreSQL 8.1.0.

Standard flex lexer behavior.  "1" followed by "w" cannot begin
a legal token, therefore "1" is a token by itself.

This is not really any different from the fact that you can write
"2+2" without any spaces.
		regards, tom lane

FAQ