Re: alter table alter column ... (larger type) ... when there are dependent views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: alter table alter column ... (larger type) ... when there are dependent views
Дата
Msg-id 924.1462936937@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: alter table alter column ... (larger type) ... when there are dependent views  (Euler Taveira <euler@timbira.com.br>)
Ответы Re: alter table alter column ... (larger type) ... when there are dependent views  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Euler Taveira <euler@timbira.com.br> writes:
> On 10-05-2016 20:59, Rob Bygrave wrote:
>> Having read all the previous discussions on the general topic of
>> altering tables with dependent views I realise this is a complex and
>> difficult issue in general but I'd like to see if there was some support
>> for looking at these 3 more specific changes. 
>> 1. making a varchar column larger  e.g. varchar(10) -> varchar(20)
>> 2. changing int to bigint
>> 3. changing varchar to text

> It seems an useful feature request.

FWIW, I think thinking of it like that will almost certainly fall foul
of Polya's Inventor's Paradox.  A solution, if practical at all, will
very likely be simpler as well as more useful if it's datatype
independent.

You should look at the code in ALTER TABLE that tries to rebuild index
definitions during ALTER COLUMN TYPE, and see if that can be adapted
to updating views.
        regards, tom lane



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

Предыдущее
От: Euler Taveira
Дата:
Сообщение: Re: Accurate list of Keywords / Datatypes?
Следующее
От: Robins Tharakan
Дата:
Сообщение: Re: Accurate list of Keywords / Datatypes?