Changing GENERATED ALWAYS AS expression

Поиск
Список
Период
Сортировка
От Will Bryant
Тема Changing GENERATED ALWAYS AS expression
Дата
Msg-id 42D90443-FA2C-4073-9896-7A4498AE7013@gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hello,

I’ve been testing out the 12 (beta) support for generated columns, mainly in order to add support for them to the
databasesynchronisation software I maintain (Kitchen Sync). 

So far it looks good compared to the similar functionality on MariaDB and MySQL (apart from VIRTUAL support which I see
waspulled out because it wasn’t ready). 

But I can’t see a way to change the expression for the generated column after its been created initially. I was looking
forsomething like the SET/DROP NOT NULL alter clauses, perhaps ALTER TABLE foo ALTER bar SET GENERATED ALWAYS AS (…)
STORED,but that doesn’t work and I can’t see anything in the docs.  (MySQL/MariaDB don’t have anything specific, but
theyhave the generic MODIFY column syntax which does allow you to change stored column definitions.) 

I can remove and add back the column, but that has the undesirable effect of changing the column order and requires
recreatingall the indexes etc. which gets messy. 

Any thoughts?  Will this be implemented later?

Cheers,
Will


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

Предыдущее
От: Ronan Dunklau
Дата:
Сообщение: Inconsistency between attname of index and attname of relation
Следующее
От: John Naylor
Дата:
Сообщение: Re: benchmarking Flex practices