Re: Problem with pg_dump -n schemaname - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Problem with pg_dump -n schemaname
Date
Msg-id 200711242015.lAOKFbD14034@momjian.us
Whole thread Raw
In response to Re: Problem with pg_dump -n schemaname  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> The fact that schema ss might not exist is one of the scenarios that
> we need to qualify the primary name in the DROP to protect against.
> It's possible say that "complex" would get mis-resolved as some other
> type "complex" in some other schema, but it doesn't matter since the
> qualified function name will surely not match anything else.
>
> What I think we ought to do is just reset currSchema once, after the
> DROP phase is completed, whether or not any schemas were dropped.
> This will be considerably more bulletproof in partial-restore
> situations.
>
> Will go fix.

OK.  I did consider that option but was unsure of the ramifications.
The problem is definitely subtle.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problem with pg_dump -n schemaname
Next
From: Tom Lane
Date:
Subject: Proposed patch to adjust UNION/CASE/etc type resolution rules