Re: pg_dump quietly ignore missing tables - is it bug? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pg_dump quietly ignore missing tables - is it bug?
Date
Msg-id CA+TgmobP+KSFwNY36L1-y6e3uyBwnDRt39Z8S59EwXjfynzZkA@mail.gmail.com
Whole thread Raw
In response to pg_dump quietly ignore missing tables - is it bug?  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: pg_dump quietly ignore missing tables - is it bug?
List pgsql-hackers
On Fri, Mar 13, 2015 at 11:26 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> we found possible bug in pg_dump. It raise a error only when all specified
> tables doesn't exists. When it find any table, then ignore missing other.
>
> /usr/local/pgsql/bin/pg_dump -t Foo -t omega -s postgres > /dev/null; echo
> $?
>
> foo doesn't exists - it creates broken backup due missing "Foo" table
>
>  [pavel@localhost include]$ /usr/local/pgsql/bin/pg_dump -t Foo -t omegaa -s
> postgres > /dev/null; echo $?
> pg_dump: No matching tables were found
> 1
>
> Is it ok? I am thinking, so it is potentially dangerous. Any explicitly
> specified table should to exists.

Keep in mind that the argument to -t is a pattern, not just a table
name.  I'm not sure how much that affects the calculus here, but it's
something to think about.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: mogrify and indent features for jsonb
Next
From: Pavel Stehule
Date:
Subject: Re: pg_dump quietly ignore missing tables - is it bug?