Re[2]: ERROR: Bad timestamp external representation '' - Mailing list pgsql-general

From Boris
Subject Re[2]: ERROR: Bad timestamp external representation ''
Date
Msg-id 64110618500.20010318220025@x-itec.de
Whole thread Raw
In response to Re: ERROR: Bad timestamp external representation ''  ("Eric G. Miller" <egm2@jps.net>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: simple question regarding the building of psql
Next
From: "Matthew Brown"
Date:
Subject: Question about databases in general