| From: | John R Pierce <pierce(at)hogranch(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: #PERSONAL# Reg: date going as 01/01/0001 |
| Date: | 2015-03-06 05:13:52 |
| Message-ID: | 54F93790.20409@hogranch.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alan Nilsson | 2015-03-06 06:23:39 | streaming replication across platforms |
| Previous Message | Medhavi Mahansaria | 2015-03-06 04:34:38 | #PERSONAL# Reg: date going as 01/01/0001 |