Re: Should we document how column DEFAULT expressions work?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Should we document how column DEFAULT expressions work?
Дата
Msg-id CAKFQuwZ33QTgBw9P1MbZyn7gim_MopJFg0qJSpnvSsVcMXte+Q@mail.gmail.com
обсуждение исходный текст
Ответ на Should we document how column DEFAULT expressions work?  (James Coleman <jtc331@gmail.com>)
Список pgsql-hackers
On Tuesday, June 25, 2024, James Coleman <jtc331@gmail.com> wrote:
Hello,

It's possible I'm the only one who's been in this situation, but I've
multiple times found myself explaining to a user how column DEFAULT
expressions work: namely how the quoting on an expression following
the keyword DEFAULT controls whether or not the expression is
evaluated at the time of the DDL statement or at the time of an
insertion.

I don’t know if it’s worth documenting but the following sentence is implied by the syntax:

“Do not single quote the expression as a whole.  Write the expression as you would in a select query.”

David J.

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Should we document how column DEFAULT expressions work?
Следующее
От: David Rowley
Дата:
Сообщение: Re: Should we document how column DEFAULT expressions work?