public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Celia McInnis <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: altering a column to to make it generated
Date: Mon, 22 Apr 2024 16:11:43 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwb5i7nW+QcYfpCb2=SnXyURsGXd3_YwEBw61HuB4muv2g@mail.gmail.com>
References: <CAGD6t7L68jXK6jOLHhyRijSE1y-Y_pic9RZaNyBG+-QY4pa=6Q@mail.gmail.com>
<CAKFQuwb5i7nW+QcYfpCb2=SnXyURsGXd3_YwEBw61HuB4muv2g@mail.gmail.com>
"David G. Johnston" <[email protected]> writes:
> On Mon, Apr 22, 2024 at 12:42 PM Celia McInnis <[email protected]>
> 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
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: altering a column to to make it generated
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox