Re: Column value derived from generated column in INSERT?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Column value derived from generated column in INSERT?
Дата
Msg-id CAKFQuwZpq-hZ-zBN8KhzF3Ke3bheHHpp_f=tEkH30+JTXtaMsg@mail.gmail.com
обсуждение исходный текст
Ответ на Column value derived from generated column in INSERT?  (Mark Raynsford <co+org.postgresql@io7m.com>)
Ответы Re: Column value derived from generated column in INSERT?  (Mark Raynsford <co+org.postgresql@io7m.com>)
Список pgsql-general
On Wed, Oct 19, 2022 at 10:36 AM Mark Raynsford <co+org.postgresql@io7m.com> wrote:
  insert into t (y) values (t.x * 2);

I can think of various ways to do it with multiple statements, but a
single statement would be preferable.


No, by extension of the documented constraint: "The generation expression can refer to other columns in the table, but not other generated columns."

David J.

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

Предыдущее
От: Mark Raynsford
Дата:
Сообщение: Column value derived from generated column in INSERT?
Следующее
От: Philip Semanchuk
Дата:
Сообщение: Custom function ROWS hint ignored due to inlining?