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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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:40:35
Message-ID: CAFj8pRCLp0bHKo9_NTJYd3yj6wv_TcQtyP6FSGOCJh=HDGWTig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-05-22 18:35 GMT+02:00 Shulgin, Oleksandr <oleksandr(dot)shulgin(at)zalando(dot)de>
:

> On Fri, May 22, 2015 at 6:32 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
>
>>
>>
>> 2015-05-22 18:30 GMT+02:00 Shulgin, Oleksandr <
>> oleksandr(dot)shulgin(at)zalando(dot)de>:
>>
>>> On Fri, May 22, 2015 at 6:09 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
>>> wrote:
>>>
>>>>
>>>> 2015-05-21 16:48 GMT+02:00 Oleksandr Shulgin <
>>>> oleksandr(dot)shulgin(at)zalando(dot)de>:
>>>>
>>>>>
>>>>> 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).
>>>>>
>>>>
>>>> it was prototype - I believe so issue with describe.c can be solved
>>>> better
>>>>
>>>>
>>>>>
>>>>> 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 propose instead to add a separate new option --strict-include,
>>>>> without
>>>>> argument, that only controls the behavior when an include pattern
>>>>> didn't
>>>>> find any table (or schema).
>>>>>
>>>>
>>>> hard to say - any variant has own advantages and disadvantages
>>>>
>>>> But I more to unlike it than like - it is more usual, when you use
>>>> exact name so, you need it exactly one, and when you use some wildcard, so
>>>> you are expecting one or more tables.
>>>>
>>>> This use case is not checked in your patch.
>>>>
>>>
>>> Maybe I'm missing something, but I believe it's handled by
>>>
>>> pg_dump -t mytables* --strict-include
>>>
>>> so that it will error out if nothing was found for mytables* pattern.
>>>
>>
>> If I understand it raise a error when it found more than one table
>>
>
> I hope not, and that totally was not my intent :-p
>
> It should raise if it found *less than* one, that is: none.
>

ok, then I have not objection

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-05-22 16:41:57 Re: pg_dump quietly ignore missing tables - is it bug?
Previous Message Piotr Gasidło 2015-05-22 16:36:40 Re: Strange replication problem - segment restored from archive but still requested from master