Re: alter table alter type CASCADE

From: Chris Barnes <compuguruchrisbarnes(at)hotmail(dot)com>
To: <thombrown(at)gmail(dot)com>, <sim(at)compulab(dot)co(dot)il>
Cc: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: alter table alter type CASCADE
Date: 2010-05-05 12:14:38
Message-ID: BLU149-W27BF8183582DCB6E39B18AD4F40@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It has been some years since I worked with Oracle, doesn't Oracle recompile the view when the object it references changes in structure?

Send

From: thombrown(at)gmail(dot)com
Date: Wed, 5 May 2010 10:12:34 +0100
Subject: Re: [GENERAL] alter table alter type CASCADE
To: sim(at)compulab(dot)co(dot)il
CC: pgsql-general(at)postgresql(dot)org

2010/5/5 Sim Zacks <sim(at)compulab(dot)co(dot)il>

One of the biggest problems I have maintaining a database with a lot of

views is that when I want to change a datatype, I have to drop every

view uses the column and every view that uses those views etc...

This turns into a maintenance nightmare.

Is there any intention of adding a CASCADE to alter type which would

automatically update any dependencies with the new datatype? Obviously

it should error out if it wouldn't have let you save one of the views

with the new datatype.

Thanks

Sim

--
Yes, there is an intention of adding such functionality (3rd item) but probably not very straightforward: http://wiki.postgresql.org/wiki/Todo#Views_.2F_Rules

Regards

Thom

_________________________________________________________________
Win a $10,000 shopping spree from Hotmail! Enter now.
http://go.microsoft.com/?linkid=9729711

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2010-05-05 12:31:29 Re: alter table alter type CASCADE
Previous Message Daniel Schuchardt 2010-05-05 11:23:59 dynamically access columns in trigger