Re: postgresql vs mysql

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: postgresql vs mysql
Дата
Msg-id 20070223232418.GE22582@svana.org
обсуждение исходный текст
Ответ на Re: postgresql vs mysql  (Glen Parker <glenebob@nwlink.com>)
Список 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] urgent: upgraded to 8.2, getting kernel panics
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_autovacuum should allow NULL values