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

From: Boris <koester(at)x-itec(dot)de>
To: "Eric G(dot) Miller" <egm2(at)jps(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re[2]: ERROR: Bad timestamp external representation ''
Date: 2001-03-18 21:00:25
Message-ID: 64110618500.20010318220025@x-itec.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Willis, Ian (Ento, Canberra) 2001-03-18 23:13:53 RE: Re: Re: Fast Inserts and Hardware Questions
Previous Message Boris 2001-03-18 20:56:20 Re[2]: ERROR: Bad timestamp external representation ''