Search Postgresql Archives

Re: postgresql vs mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 23, 2007 at 02:50:48PM -0800, Glen Parker wrote:
> I can and do solve the problem by simply not using NULL in character 
> fields, and by the rather gratuitous use of coalesce() in queries.  

I'm confused. If you don't use NULLs then you don't need coalesce
either.

> The 
> problem is, it places a burden on people doing ad hoc queries who, 
> because of the type of data they work with, have no reason to understand 
> the concept of NULL as it exists in standard SQL.  These aren't computer 
> scientists, they are accountants and managers.  The result is queries 
> that either return bad data, or that appear much more complex than 
> should be required to people who can't see why NULL == zero is NULL.

Is it really that hard to understand that UNKNOWN == zero is UNKNOWN?

And again, if NULL is confusing on your systems, don't use it. They
don't appear out of nowhere. Outer joins are really the only place you
can't avoid them.

> And as I said, I really don't know what a fully functional solution 
> would look like, I just know that it would be useful to a large cross 
> section of users.

Useful, maybe. Confusing, absolutly. I'm just wondering how it would
interact with foreign keys for example. Different people can't have
different ideas about '' = NULL, else you'd get constraints that are
violated depending on who's looking.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux