Review: check existency of table for -t option (pg_dump) when pattern...

Lists: pgsql-hackers
From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Review: check existency of table for -t option (pg_dump) when pattern...
Date: 2015-09-11 15:59:48
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

https://commitfest.postgresql.org/6/201/

Patch looks good and is helpful in some usecases. I found and fix some typo (new
version in attach), but patch shows some inconsistent output:
% pg_dump -t 'aaa*' postgres
pg_dump: No matching tables were found
% pg_dump -t 'aaa*' --strict-names postgres
pg_dump: Table "aaa*" not found.

In second case error message is obviously worse.
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

Attachment Content-Type Size
pg_dump-strict-names-9.patch text/plain 14.9 KB

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: check existency of table for -t option (pg_dump) when pattern...
Date: 2015-09-12 06:52:13
Message-ID: CAFj8pRCXPZc8xc4n_mv-AAaC5XVYN=pWmALrbuNim2PQdak0qw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

Hi

2015-09-11 17:59 GMT+02:00 Teodor Sigaev <teodor(at)sigaev(dot)ru>:

> https://commitfest.postgresql.org/6/201/
>
> Patch looks good and is helpful in some usecases. I found and fix some
> typo (new version in attach), but patch shows some inconsistent output:
> % pg_dump -t 'aaa*' postgres
> pg_dump: No matching tables were found
> % pg_dump -t 'aaa*' --strict-names postgres
> pg_dump: Table "aaa*" not found.
>
> In second case error message is obviously worse.
>

There are two different situation - first message says "there are not any
table for work", second says "There are not specific table(s) with specific
names (mask)". I am thinking so this information is enough interesting for
showing.

Can be changed to "No matching table(s) were found for filter "aaa*" " ?

Regards

Pavel

> --
> Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
> WWW:
> http://www.sigaev.ru/
>


From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: check existency of table for -t option (pg_dump) when pattern...
Date: 2015-09-14 10:05:56
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

> (new version in attach), but patch shows some inconsistent output:
> % pg_dump -t 'aaa*' postgres
> pg_dump: No matching tables were found
> % pg_dump -t 'aaa*' --strict-names postgres
> pg_dump: Table "aaa*" not found.

> There are two different situation - first message says "there are not any table
> for work", second says "There are not specific table(s) with specific names
> (mask)". I am thinking so this information is enough interesting for showing.
Agree, but "aaa*" is not a table

>
> Can be changed to "No matching table(s) were found for filter "aaa*" " ?

"TBL" is not a filter. May be:

No matching table(s) were found for pattern "aaa*" ?
No matching table(s) were found for pattern "TBL" ?

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/


From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: check existency of table for -t option (pg_dump) when pattern...
Date: 2015-09-14 10:07:05
Message-ID: CAFj8pRA7s9x_Y1eGbkbBUPkNYO2zKY2nB_w_AQjYXgq9cnLncg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

2015-09-14 12:05 GMT+02:00 Teodor Sigaev <teodor(at)sigaev(dot)ru>:

> (new version in attach), but patch shows some inconsistent output:
>> % pg_dump -t 'aaa*' postgres
>> pg_dump: No matching tables were found
>> % pg_dump -t 'aaa*' --strict-names postgres
>> pg_dump: Table "aaa*" not found.
>>
>
> There are two different situation - first message says "there are not any
>> table
>> for work", second says "There are not specific table(s) with specific
>> names
>> (mask)". I am thinking so this information is enough interesting for
>> showing.
>>
> Agree, but "aaa*" is not a table
>
>
>> Can be changed to "No matching table(s) were found for filter "aaa*" " ?
>>
>
> "TBL" is not a filter. May be:
>
> No matching table(s) were found for pattern "aaa*" ?
> No matching table(s) were found for pattern "TBL" ?

+1

it is better

Pavel

>
>
> --
> Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
> WWW:
> http://www.sigaev.ru/
>