Re: pg_dump quietly ignore missing tables - is it bug?

From: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump quietly ignore missing tables - is it bug?
Date: 2015-05-22 16:45:52
Message-ID: CACACo5RVru-GWNgziF7SSwYFsDaYJO=tn=imGFhuc60cfpg4Gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 22, 2015 at 6:34 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)de> writes:
> > I think this is a bit over-engineered (apart from the fact that
> > processSQLNamePattern is also used in two dozen of places in
> > psql/describe.c and all of them must be touched for this patch to
> > compile).
>
> > Also, the new --table-if-exists options seems to be doing what the old
> > --table did, and I'm not really sure I underestand what --table does
> > now.
>
> I'm pretty sure we had agreed *not* to change the default behavior of -t.
>

My patch does that, in the case of no-wildcards -t argument.

However, it can be fixed easily: just drop that strcspn() call, and then
default behavior is the same for both wildcard and exact matches, since
--strict-include is off by default.

--
Alex

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2015-05-22 16:51:29 Re: [PATCH] Generalized JSON output functions
Previous Message Pavel Stehule 2015-05-22 16:41:57 Re: pg_dump quietly ignore missing tables - is it bug?