Re: DEFAULT in update & prepared statements

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: DEFAULT in update & prepared statements
Дата
Msg-id CAKFQuwZ0+0GyZytpska6ybFNHLBKg9GKr_czPvBmhg6uQmh2ow@mail.gmail.com
обсуждение исходный текст
Ответ на DEFAULT in update & prepared statements  (Sanjay Minni <sanjay.minni@gmail.com>)
Ответы Re: DEFAULT in update & prepared statements
Список pgsql-sql
On Wednesday, November 8, 2023, Sanjay Minni <sanjay.minni@gmail.com> wrote:
Can DEFAULT (defined for a timestamp column as now() ) be used in
1. prepared statement i.e. EXECUTE ( ..., DEFAULT, ...)
2. in an UPDATE statement  UPDATE TABLE SET update_time = DEFAULT ..

5 seconds looking at the syntax for update in the docs answers the second question.

The first question doesn’t really make sense - but regardless of what you are trying to communicate there just try it.  If the result you get doesn’t make sense post what you tried.

David J.
 

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

Предыдущее
От: Sanjay Minni
Дата:
Сообщение: DEFAULT in update & prepared statements
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: DEFAULT in update & prepared statements