Re: #PERSONAL# Reg: date going as 01/01/0001

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: #PERSONAL# Reg: date going as 01/01/0001
Дата
Msg-id 54F93790.20409@hogranch.com
обсуждение исходный текст
Ответ на #PERSONAL# Reg: date going as 01/01/0001  (Medhavi Mahansaria <medhavi.mahansaria@tcs.com>)
Список pgsql-general
On 3/5/2015 8:34 PM, Medhavi Mahansaria wrote:
I need to enter the date in null column based on the results obtained.

but my date gets inserted as 01/01/0001 in postgresql 9.3 when there is no value.
I need to enter NULL in the column.

ummmmmm, it seems to work fine for me?    you give us no clue how you're inserting this date field.


test=# create table test (calendar date);
CREATE TABLE
test=# insert into test (calendar) values (null);
INSERT 0 1
test=# select calendar, calendar IS NULL from test;
 calendar | ?column?
----------+----------
          | t
(1 row)



-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast

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

Предыдущее
От: Medhavi Mahansaria
Дата:
Сообщение: #PERSONAL# Reg: date going as 01/01/0001
Следующее
От: Alan Nilsson
Дата:
Сообщение: streaming replication across platforms