Re: alter table alter type CASCADE - Mailing list pgsql-general

From Thom Brown
Subject Re: alter table alter type CASCADE
Date
Msg-id s2obddc86151005050531h68bc43bem8791943acbbf1f32@mail.gmail.com
Whole thread Raw
In response to Re: alter table alter type CASCADE  (Chris Barnes <compuguruchrisbarnes@hotmail.com>)
Responses Re: alter table alter type CASCADE  (Peter Hunsberger <peter.hunsberger@gmail.com>)
List pgsql-general
On 5 May 2010 13:14, Chris Barnes <compuguruchrisbarnes@hotmail.com> wrote:

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

What does Oracle do when you've got a view like:

CREATE OR REPLACE VIEW test_view AS
 SELECT test.test_id, test.test_value, date_is_future(test.test_date) as upcoming
   FROM test;

Where date_is_future expects a text field, but you change the test table so that test_date is now varchar(20)?  The function no longer matches the signature.  Does it just prevent it?  And what about when conditions are provided in a WHERE clause which become invalid when the column type changes?

Thom

pgsql-general by date:

Previous
From: Chris Barnes
Date:
Subject: Re: alter table alter type CASCADE
Next
From: Scott Marlowe
Date:
Subject: Re: Savepoint and prepared transactions