From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Sanjay Minni <sanjay(dot)minni(at)gmail(dot)com> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: timestamp default current_timestamp not working |
Date: | 2021-12-14 16:08:26 |
Message-ID: | CAKFQuwan84V+C0OSVxjCxm-HpzpM1-YB5W2bqaviF-PSbG-SvA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tuesday, December 14, 2021, Sanjay Minni <sanjay(dot)minni(at)gmail(dot)com> wrote:
> Its an insert and my insert SQL contains the column timestamp and value
> nil.
> Will it work if the SQL contains timestamp through value is nil
>
>>
>>
If you explicitly specify NULL for the value of the column then there is no
need for the system to produce a default, and thus you will see NULL when
you query that record.
You can say “DEFAULT” (no quotes) though if you need to have the column
name in the Insert statement but still want the default to be used.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2021-12-14 16:10:52 | Re: timestamp default current_timestamp not working |
Previous Message | Ron | 2021-12-14 16:06:40 | Re: timestamp default current_timestamp not working |