From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Euler Taveira <euler(at)timbira(dot)com(dot)br> |
Cc: | 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 03:22:17 |
Message-ID: | 924.1462936937@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Euler Taveira <euler(at)timbira(dot)com(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robins Tharakan | 2016-05-11 03:36:07 | Re: Accurate list of Keywords / Datatypes? |
Previous Message | Euler Taveira | 2016-05-11 02:51:44 | Re: Accurate list of Keywords / Datatypes? |