Re: postgresql vs mysql

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Glen Parker <glenebob(at)nwlink(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgresql vs mysql
Date: 2007-02-23 23:24:18
Message-ID: 20070223232418.GE22582@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-02-23 23:26:46 Re: pg_autovacuum should allow NULL values
Previous Message Tom Lane 2007-02-23 23:14:25 Re: [HACKERS] urgent: upgraded to 8.2, getting kernel panics