Re: altering a column to to make it generated

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: altering a column to to make it generated
Дата
Msg-id 3155442.1713816703@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: altering a column to to make it generated  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Mon, Apr 22, 2024 at 12:42 PM Celia McInnis <celia.mcinnis@gmail.com>
> wrote:
>> Can I alter a table column to now make it generated? I tried this
>> unsuccessfully:

> I looked at all of the "alter table ... alter column" commands listed here:
> https://www.postgresql.org/docs/current/sql-altertable.html
> And none seem to involve the generated expression column.  So the answer is
> no.

I think what you'd need to do is drop the existing column
and then add a generated column.

            regards, tom lane



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: altering a column to to make it generated
Следующее
От: Atul Kumar
Дата:
Сообщение: issue with reading hostname