Re: null value in date field

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: null value in date field
Дата
Msg-id 20030219124108.X37141-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на null value in date field  (Jeff Deroshia <jeff@hal.physast.uga.edu>)
Список pgsql-general
On Tue, 18 Feb 2003, Jeff Deroshia wrote:

> I have a form that contains optional DATE fields.  To enter null
> values, I've tried null, 'null', '', '-', '0', 0, and each time I get
> the following error:
>
> ERROR:  Bad numeric input format ''

Are you sure this is on a date field?  Date should be giving you
something like (at least in 7.3):
 ERROR: Bad date external representation ''

Null works for me...
sszabo=# create table test(a date);
CREATE TABLE
sszabo=# insert into test (a) values (null);
INSERT 4256129 1
sszabo=# insert into test (a) values ('');
ERROR:  Bad date external representation ''




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