Re: Question about a query with two count fields
От | David Fetter |
---|---|
Тема | Re: Question about a query with two count fields |
Дата | |
Msg-id | 20070911184213.GY6661@fetter.org обсуждение исходный текст |
Ответ на | Re: Question about a query with two count fields (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Question about a query with two count fields
|
Список | pgsql-general |
On Tue, Sep 11, 2007 at 02:28:24PM -0400, Tom Lane wrote: > "George Pavlov" <gpavlov@mynewplace.com> writes: > >> From: David Fetter [mailto:david@fetter.org] > >> 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 <david@fetter.org> 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
В списке pgsql-general по дате отправления: