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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:01:06
Message-ID: 28626.1288310466@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Josh Kupershmidt" <schmiddy(at)gmail(dot)com> writes:
> I noticed that Postgres in many cases will happily tokenize WHERE clauses
> having no space between a condition and "AND" or "OR".

This has nothing to do with AND or OR. Any situation where you have
some digits followed by something that can't be part of a number will
be lexed as two separate tokens. I'm not sure we could change that,
because it's a pretty basic aspect of a flex lexer; and even if we
could I'm not eager to face the wrath of all the users whose queries
would break. Leaving out "unnecessary" spaces is a pretty common habit.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Davis 2010-10-29 00:03:22 Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Previous Message Mark Kirkwood 2010-10-28 23:57:19 Re: Btree index left link changed unexpectedly after bringing up 8.3.11 warm standby