Re: [SQL] default for date/time types

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [SQL] default for date/time types
Дата
Msg-id Pine.GSO.4.02A.10003060806200.17581-100000@Svan.DoCS.UU.SE
обсуждение исходный текст
Ответ на default for date/time types  ("Seth Banks" <seth@subimage.com>)
Список pgsql-sql
On Sun, 5 Mar 2000, Seth Banks wrote:

> if i were to setup a date or time type in my database, what would be a
> good default value to use (an empty one, but not null)

The way you're asking you probably do want to use NULL because there's no
such thing as an "empty date". NULL is supposed to fill exactly that gap.
However, if for some reason you really can't use NULL then consider
perhaps 'invalid' or '-infinity' but these are distinctly non-portable and
might not buy you much in terms of elegance. Implementor beware. :)

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



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

Предыдущее
От: "Seth Banks"
Дата:
Сообщение: default for date/time types
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [SQL] dayname() doubt