Re: timestamp default current_timestamp not working

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: timestamp default current_timestamp not working
Дата
Msg-id ee3549e8-5bf7-9187-5732-5ef1ba739f01@aklaver.com
обсуждение исходный текст
Ответ на Re: timestamp default current_timestamp not working  (Sanjay Minni <sanjay.minni@gmail.com>)
Список pgsql-general
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@aklaver.com 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: timestamp default current_timestamp not working
Следующее
От: Klaudie Willis
Дата:
Сообщение: Re: When Update balloons memory