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

From Euler Taveira
Subject Re: alter table alter column ... (larger type) ... when there are dependent views
Date
Msg-id 57329438.4030608@timbira.com.br
Whole thread Raw
In response to alter table alter column ... (larger type) ... when there are dependent views  (Rob Bygrave <robin.bygrave@gmail.com>)
Responses Re: alter table alter column ... (larger type) ... when there are dependent views
List pgsql-hackers
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. I've already crossed that bridge
while maintaining such a dynamic database schemas. I don't see why we
couldn't implement this feature. I'll take a stab at it for the first
commitfest.

> I have seen that there are people motivated enough to update
> pg_attribute directly (update pg_attribute a set a.atttypmod = 20 + 4 ...).
> 
Yuk, this definitely bypass the ATExecAlterColumnType(). It is a hack
and must be done with care.


--   Euler Taveira                   Timbira - http://www.timbira.com.br/  PostgreSQL: Consultoria, Desenvolvimento,
Suporte24x7 e Treinamento
 



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: release management team statement on patch reverts
Next
From: Amit Langote
Date:
Subject: Re: Declarative partitioning