Re: proposal: possibility to read dumped table's name from file

Поиск
Список
Период
Сортировка
От vignesh C
Тема Re: proposal: possibility to read dumped table's name from file
Дата
Msg-id CALDaNm1Qq5Y-BGVNm7HiYieM9cFp3BCJsb5N67XhbBCTzAPRDw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: possibility to read dumped table's name from file  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: possibility to read dumped table's name from file  (Justin Pryzby <pryzby@telsasoft.com>)
Re: proposal: possibility to read dumped table's name from file  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Tue, Jul 14, 2020 at 12:03 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> I meant can this:
>> printf(_("  --filter=FILENAME            read object name filter
>> expressions from file\n"));
>> be changed to:
>> printf(_("  --filter=FILENAME            dump objects and data based
>> on the filter expressions from the filter file\n"));
>
> done in today patch
>

Thanks for fixing the  comments.
Few comments:
+ /* use "-" as symbol for stdin */
+ if (strcmp(filename, "-") != 0)
+ {
+ fp = fopen(filename, "r");
+ if (!fp)
+ fatal("could not open the input file \"%s\": %m",
+   filename);
+ }
+ else
+ fp = stdin;

We could use STDIN itself instead of -, it will be a more easier
option to understand.

+ /* when first char is hash, ignore whole line */
+ if (*line == '#')
+ continue;

If line starts with # we ignore that line, I feel this should be
included in the documentation.

Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: Improving connection scalability: GetSnapshotData()
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: Add header support to text format and matching feature