Re: Tentative patch for making DROP put dependency info in DETAIL

From: "Alex Hunsaker" <badalex(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Tentative patch for making DROP put dependency info in DETAIL
Date: 2008-06-12 17:49:36
Message-ID: 34d269d40806121049w69ba3261rda5dc0be33a274c3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Thu, Jun 12, 2008 at 11:35 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> I don't think there's anything wrong with that in principle. However,
> does your patch actually work? The changes in expected/ is unexpected,
> I think.

Yeah I thought they looked a bit odd at first to. I thought it would
just get rid of the duplicate NOTICES's. On closer look they don't
NOITCE anymore because all the tables are listed in the drop. Here is
an example:

# with all them in in drop table
create table test (a int primary key);
create table test_a (a int references test);
create table test_b (a int references test);
drop table test, test_a, test_b cascade;
DROP TABLE

# now without test_b
create table test (a int primary key);
create table test_a (a int references test);
create table test_b (a int references test);
drop table test, test_a cascade;
NOTICE: drop cascades to constraint test_b_a_fkey on table test_b
DROP TABLE

In fact you don't even need the cascade anymore if you specify all the
dependent tables.
So that certainly *seems* right to me.

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-06-12 17:58:47 Re: Tentative patch for making DROP put dependency info in DETAIL
Previous Message Alvaro Herrera 2008-06-12 17:35:02 Re: Tentative patch for making DROP put dependency info in DETAIL