pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Henry Ortega <juandelacruz@gmail.com>
To: pgsql-sql@postgresql.org
Subject: drop view even with dependencies?
Date: Mon, 7 Mar 2005 16:38:53 -0500
Message-ID: <2bffcc3305030713384c81d59b@mail.gmail.com> (raw)

Is there a way to drop a VIEW in postgres without
the need to drop all the dependencies?

VIEW 3
    |
VIEW 2
    |
VIEW 1

In my case, VIEW 3 depends on VIEW 2, and VIEW 2 depends
on VIEW 1.

Is there a way to drop VIEW 3 without dropping VIEW 1 and 2?
I tried CREATE OR REPLACE VIEW but replace will only work
if they have the same number of fields.

Also with tables, can I drop a table even if there are multiple views
that depend on it?

It's such a pain in the neck to have to drop all the dependencies and
recreate them all over again. Any help would greatly appreciated.
I am using Postgres 7.3.2



view thread (2+ messages)  latest in thread

Message-ID: <2bffcc3305030713384c81d59b@mail.gmail.com>
Permalink:  ../2bffcc3305030713384c81d59b@mail.gmail.com/
Also on:    postgresql.org/message-id/2bffcc3305030713384c81d59b@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: juandelacruz@gmail.com
  Subject: Re: drop view even with dependencies?
  In-Reply-To: <2bffcc3305030713384c81d59b@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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