Re: alter table alter column ... (larger type) ... when there are dependent views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: alter table alter column ... (larger type) ... when there are dependent views
Date
Msg-id 924.1462936937@sss.pgh.pa.us
Whole thread Raw
In response to Re: alter table alter column ... (larger type) ... when there are dependent views  (Euler Taveira <euler@timbira.com.br>)
Responses Re: alter table alter column ... (larger type) ... when there are dependent views
List 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 by date:

Previous
From: Euler Taveira
Date:
Subject: Re: Accurate list of Keywords / Datatypes?
Next
From: Robins Tharakan
Date:
Subject: Re: Accurate list of Keywords / Datatypes?