From: | Euler Taveira <euler(at)timbira(dot)com(dot)br> |
---|---|
To: | Rob Bygrave <robin(dot)bygrave(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: alter table alter column ... (larger type) ... when there are dependent views |
Date: | 2016-05-11 02:08:56 |
Message-ID: | 57329438.4030608@timbira.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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, Suporte 24x7 e Treinamento
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2016-05-11 02:26:23 | Re: Declarative partitioning |
Previous Message | Bruce Momjian | 2016-05-11 01:33:55 | Re: release management team statement on patch reverts |