We pretty much ignore the spec's concept of non-error completion
conditions, but it sounds like Oracle tries to support it.

Anyway, there's no doubt that we can point to the behavior of MAX/MIN
as defense for what we made GREATEST/LEAST do, so I'm inclined to leave
their behavior alone, at least until such time as they're actually
standardized.  But a note in the manual pointing out the difference from
Oracle seems in order.

BTW, it seems that mysql follows Oracle on this:

mysql> select greatest(1,4,8);
+-----------------+
| greatest(1,4,8) |
+-----------------+
|               8 |
+-----------------+
1 row in set (0.00 sec)

mysql> select greatest(1,4,null);
+--------------------+
| greatest(1,4,null) |
+--------------------+
|               NULL |
+--------------------+
1 row in set (0.00 sec)

and if you want a laugh:

mysql> select greatest (1,4,8);
ERROR 1305 (42000): FUNCTION test.greatest does not exist

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq


Hello

some notes about it

http://bugs.mysql.com/bug.php?id=12791
http://bugs.mysql.com/bug.php?id=15610

Regards
Pavel

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to