Search Postgresql Archives

Re: timestamp default current_timestamp not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/14/21 08:00, Sanjay Minni 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
No nil(NULL) is a valid value for the field as you have not specified NOT NULL on the column. If you do add that constraint you will get an error with your inserts. If you want the DEFAULT to work you will need to not include the "timestamp"(FYI, not a good choice for a name) field in the INSERT.



On Tue, 14 Dec, 2021, 9:20 pm Adrian Klaver, <adrian.klaver@xxxxxxxxxxx


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux