Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Date: 2013-12-04 15:02:41
Message-ID: CAFj8pRC=rJE8dg28+KMgG4eDunQVz8isV1GoqNqWA_cUkNdraQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

2013/12/4 Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>

> On 2 December 2013 04:55, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> > Hello
> >
> > it looks well, thank you
> >
> > Regards
> >
> > Pavel
> >
>
> I've been thinking about this some more, and there's another case that
> concerns me slightly. We're now making some of the DROP...IF EXISTS
> commands tolerate non-existent types as well as non-existent schemas
> --- functions, aggregates, casts and operators all have type names in
> their specifications. Of course it's possible that the type is missing
> because it was in a schema that was dropped, so this change seems to
> be in spirit of what was discussed, but it seems like a change that
> might catch some people out.
>
> I think that, on balance, it is a sensible change, since if the type
> doesn't exist, the dependent object can't exist either, so DROP...IF
> EXISTS shouldn't be raising an error. However, I wonder if we should
> be issuing a more specific NOTICE in this case too --- i.e., check for
> non-existent types in the same way as we check for non-existent parent
> objects --- type_does_not_exist_skipping() and
> type_list_does_not_exist_skipping().
>

+1

Pavel

>
> Regards,
> Dean
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2013-12-04 15:52:57 Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd
Previous Message Dean Rasheed 2013-12-04 08:56:15 Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-12-04 15:15:33 Re: [patch] Adding EXTRA_REGRESS_OPTS to all pg_regress invocations
Previous Message Stephen Frost 2013-12-04 15:02:14 Re: Extension Templates S03E11