Quoting Guy Fraser <guy@incentre.net>:
> There already is an operator, and it is the ANSI SQL operator "IS". Just
> because "IS" does not use puctuation characters does not mean it is not
> an operator.
"IS" is not an operator in postgresql, at least not in the same sense that "="
is an operator. You can not do "\do is" while "\do =" works fine.
> select coalesce(string_column,'') from some_table ;
Will postgresql still make effective use of the indexes if I use a function like
coalesce on the column before comparing it?
Even if it does, the method I already use is more effective.
> If you still don't understand, then use MySQL it is messed up and allows
> weird things like most of what you want to do.
1) I understand the issues involved perfectly. I just happens to have a table
where it would be usefull that NULL=NULL is true. It is not so, and therefore I
have to use a syntax that is hard to read and I have been made to understand
that I will have to accept that. Fine.
2) What kind of crap is that flaming me like this? Do all users that ask a
question about why postgresql or the sql standard implements a feature in a
specific way, end up being told to switch to mysql?
3) Mysql knows how to compare nulls:
mysql> select null=null;
+-----------+
| null=null |
+-----------+
| NULL |
+-----------+
1 row in set (0.01 sec)
mysql> select null is null;
+--------------+
| null is null |
+--------------+
| 1 |
+--------------+
1 row in set (0.00 sec)
Baldur
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.