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

2016-05-12 Thread Tom Lane
Robert Haas writes: > On Tue, May 10, 2016 at 11:22 PM, Tom Lane wrote: >> 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. > I think the problems are almost entirely different. I

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

2016-05-12 Thread Robert Haas
On Tue, May 10, 2016 at 11:22 PM, Tom Lane wrote: > 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. I think the problems are almost entirely different. In the case of ALTER TABLE, w

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

2016-05-10 Thread Tom Lane
Euler Taveira 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

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

2016-05-10 Thread Euler Taveira
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

[HACKERS] alter table alter column ... (larger type) ... when there are dependent views

2016-05-10 Thread Rob Bygrave
I have read the prior discussions linked from https://wiki.postgresql.org/wiki/Todo#Views_and_Rules What I would like to do is put the specific case for handling 3 common 'alter column' changes when that column is referenced in a view. Take the case of: create table base_table ( id bigserial, ac