On Tue, Sep 11, 2007 at 02:28:24PM -0400, Tom Lane wrote:
> "George Pavlov" <[EMAIL PROTECTED]> writes:
> >> From: David Fetter [mailto:[EMAIL PROTECTED]
> >> This case statement returns true when z factorial is zero, so I'd
> >> recommend the SQL standard <> or IS NOT DISTINCT FROM instead.
> 
> > i do hate potential ambiguity... the != was something stuck in my brain
> > from old sybase, i think. i always liked != ("not equals") as more
> > intuitive than <> ("less than, greater than"???), but i will have to
> > change my ways, especially if "the standard" says so.
> 
> The notion that != might be scanned as two operators whereas <> would
> not be is nonsense.  I assume David was just joking.

My mistake.

I believe that foo!=bar without white space should simply error out
because there is no reasonable, unambiguous way to parse it.  Here's
what we get right now:

test=# SELECT (2! =0);
 ?column? 
----------
 f
(1 row)

test=# SELECT (2!=0);
 ?column? 
----------
 t
(1 row)

test=# SELECT (2 !=0);
 ?column? 
----------
 t
(1 row)

test=# SELECT (2 ! =0);
 ?column? 
----------
 f
(1 row)

test=# SELECT (2 != 0);
 ?column? 
----------
 t
(1 row)

test=# SELECT (2 ! = 0);
 ?column? 
----------
 f
(1 row)

-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to