Re: postgresql vs mysql

Поиск
Список
Период
Сортировка
От Glen Parker
Тема Re: postgresql vs mysql
Дата
Msg-id 45DE3F51.1070300@nwlink.com
обсуждение исходный текст
Ответ на Re: postgresql vs mysql  (Steve Crawford <scrawford@pinpointresearch.com>)
Ответы Re: postgresql vs mysql  (Ben <bench@silentmedia.com>)
Re: postgresql vs mysql  (Scott Ribe <scott_ribe@killerbytes.com>)
Re: postgresql vs mysql  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
Buy the same token, some application have no use whatsoever for the
distinction between NULL and ''.  In that case, the distinction just
adds work.

I would love to see different ways to handle NULL implemented by the
server.  For what I do, NULL could always compare equal to zero and ''.
  I have no use for NULL in text values.  I do need it for numerics,
however it doesn't mean "unknown", it just means "not entered", which is
different because I always treat it as zero.

I haven't put enough thought into this to make any sort of comprehensive
proposal, but it occurs to me that perhaps it could be integrated into
the type system.  If I were able to specify, for any given type, a value
that should compare equal to NULL ('' for varchar, 0 for int4, for
example), that, in combination with NOT NULL constraints, might just do
it for me.

-Glen

> Well, your mileage must vary. The absence of nulls would make my life
> difficult.
>
> Just substitute "unknown" for "null" as mentioned above and the various
> operations with "null" make sense. For example, take some days and
> low-temperatures:
> Mon: 30
> Tue: 10
> Wed: 0
> Thu: unknown
> Fri: 0
> Sat: unknown
> Sun: -5
>
> Was the low temperature the same on:
> Mon/Tue: no
> Wed/Fri: yes
> Thu/Fri: unknown
> Thu/Sat: unknown <- the always seemingly confusing null=null is null.




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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Wikipedia on Postgres (was Re: postgresql vs mysql)
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Wikipedia on Postgres (was Re: postgresql vs mysql)