Re: date default

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: date default
Дата
Msg-id 1085652121.23805.4.camel@braydb
обсуждение исходный текст
Ответ на date default  (Robert Morgan <robert_@ihug.co.nz>)
Список pgsql-novice
On Thu, 2004-05-27 at 05:30, Robert Morgan wrote:
> I'm updating a table that has a field which is datatype 'date' this
> field maybe filled out or not before update. If the field  is left blank
> I get an error, if I test to see if the field is empty and if it is, set
> the value to 0001/01/01 then postgres will accept this. I would rather
> the field remained empty but setting the field to 'null' is not accepted
> by postgres. Im using php to test and set the value.

An empty string is not the same as null; what command is PHP sending to
the backend?

If the date column is mentioned, the value inserted for it must be NULL,
not ''.  If that is already the case, make sure the column has not been
declared with a NOT NULL constraint.

Oliver Elphick


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

Предыдущее
От: Robert Morgan
Дата:
Сообщение: date default
Следующее
От: Robert Morgan
Дата:
Сообщение: Date