pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
maintaining nested views 2+ messages / 2 participants [nested] [flat]
* maintaining nested views @ 2009-10-12 06:35 Maximilian Tyrtania <maximilian.tyrtania@byte-employer.de> 0 siblings, 1 reply; 2+ messages in thread From: Maximilian Tyrtania @ 2009-10-12 06:35 UTC (permalink / raw) To: pgsql-sql Quite often i find myself reluctant to nest views, because of the maintenance issues this usually involves. As you know, you can't easily alter the "lower level" views, because the higher level ones depend on them. So, to add a field to a lower level view one has to: drop view vw_lowlevel CASCADE; create view vw_lowlevel as .....; create view vw_highlevel as (it was); This can be quite cumbersome if there are many high level views and i don't want them to be altered (or at least not all of them). I'm just wondering if maybe someone has come up with a generic solution for this? Max ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: maintaining nested views @ 2009-10-12 13:57 Tom Lane <tgl@sss.pgh.pa.us> parent: Maximilian Tyrtania <maximilian.tyrtania@byte-employer.de> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2009-10-12 13:57 UTC (permalink / raw) To: Maximilian Tyrtania <maximilian.tyrtania@byte-employer.de>; +Cc: pgsql-sql Maximilian Tyrtania <maximilian.tyrtania@byte-employer.de> writes: > Quite often i find myself reluctant to nest views, because of the > maintenance issues this usually involves. As you know, you can't easily > alter the "lower level" views, because the higher level ones depend on them. > So, to add a field to a lower level view one has to: > drop view vw_lowlevel CASCADE; As of 8.4 you can add a column via CREATE OR REPLACE VIEW without that. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2009-10-12 13:57 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2009-10-12 06:35 maintaining nested views Maximilian Tyrtania <maximilian.tyrtania@byte-employer.de> 2009-10-12 13:57 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox