Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Дата
Msg-id 1288310602.20385.15.camel@jdavis-ux.asterdata.local
обсуждение исходный текст
Ответ на BUG #5732: parsing of: "WHERE mycol=123AND ..."  ("Josh Kupershmidt" <schmiddy@gmail.com>)
Ответы Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Список pgsql-bugs
On Thu, 2010-10-28 at 23:46 +0000, Josh Kupershmidt wrote:
>   SELECT * FROM mytab WHERE mycol = 2OR true;

Is that inconsistent with the standard?

Other languages seem to allow similar things, such as ruby and perl. For
instance, in ruby:

  puts 1if(true)

seems to be acceptable.

> although some cases produce an error, as I would expect, such as:
>   SELECT * FROM mytab WHERE mycol = 2::intOR true;

That's not the same. In that example, there's no hope of distinguishing
the identifier "int" from the keyword "OR".

> I think it would be more consistent to raise syntax errors in all these
> cases.

I don't really see a "bug" here. Is this causing you some kind of
problem?

Regards,
    Jeff Davis

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."