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

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Date: 2010-10-29 00:03:22
Message-ID: 1288310602.20385.15.camel@jdavis-ux.asterdata.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-10-29 00:20:19 Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Previous Message Tom Lane 2010-10-29 00:01:06 Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."