Обсуждение: Null Value Stored for Date e TimeStamp

Поиск
Список
Период
Сортировка

Null Value Stored for Date e TimeStamp

От
Fernando Ferreira
Дата:
Hi,

I would like know about the value stored for null value for fields date 
and timestamp.

Sample             SQL Server 1753/01/01              Oracle         0001/01/01             Informix       1899/01/01
Visual Foxpro  DBF   1899/12/30

I used a tool for migrate database and informed the nullvalues for date 
fields in source and destine database.

I 'm convert DBF to PostgreSQL and the values for null dates from DBF 
are stored as 1899/12/30 in PostgreSQL tables.

Thanks

Fernando Ferreira



Re: Null Value Stored for Date e TimeStamp

От
Tom Lane
Дата:
Fernando Ferreira <lfernando@pop.com.br> writes:
> I would like know about the value stored for null value for fields date 
> and timestamp.

There isn't any; we don't store anything at all for a null.

I don't think those other DBs you mention equate a null to some
particular randomly chosen date, either.  You might be dealing with
some broken application software that uses such a thing as a way to
avoid dealing with true nulls ...
        regards, tom lane