Re[2]: ERROR: Bad timestamp external representation ''

Поиск
Список
Период
Сортировка
От Boris
Тема Re[2]: ERROR: Bad timestamp external representation ''
Дата
Msg-id 64110618500.20010318220025@x-itec.de
обсуждение исходный текст
Ответ на Re: ERROR: Bad timestamp external representation ''  ("Eric G. Miller" <egm2@jps.net>)
Список pgsql-general
Hello Eric,

Sunday, March 18, 2001, 9:14:19 PM, you wrote:



EGM> But "NULL" or 'NULL' is a quoted string.  What does MySQL do if you
EGM> try to insert "NULL" into a string field.  Do you get the phrase "NULL"

Yes this is correct, but it does not fit on a datetime field.

It is very useful if you are programming something with php and you
can use '$variable' and if you not need to check if the variable is
empty or not.

Now I have to make some changes in my code, but its ok no problem. I
like postgres more than mysql -))


EGM> Well, nothing is ever supposed to equal NULL.  NULL is indeterminate,
EGM> unknown, can't be compared to...  Just because MySQL does it wrong,
EGM> doesn't mean that PostgreSQL should. The only "proper" way to test
EGM> for the NULL condition is to use IS NULL (or IS NOT NULL, etc...).
EGM> So queries should be "select foo from bar where adate is null", or
EGM> similar...

Ok, thats a great idea! Thanks!



--
Boris



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: simple question regarding the building of psql
Следующее
От: "Matthew Brown"
Дата:
Сообщение: Question about databases in general