RE: proposal: pg_restore --convert-to-text

Поиск
Список
Период
Сортировка
От Imai, Yoshikazu
Тема RE: proposal: pg_restore --convert-to-text
Дата
Msg-id 0F97FA9ABBDBE54F91744A9B37151A51299506@g01jpexmbkw24
обсуждение исходный текст
Ответ на Re: proposal: pg_restore --convert-to-text  (Euler Taveira <euler@timbira.com.br>)
Ответы RE: proposal: pg_restore --convert-to-text  ("José Arthur Benetasso Villanova" <jose.arthur@gmail.com>)
Re: proposal: pg_restore --convert-to-text  (Euler Taveira <euler@timbira.com.br>)
Список pgsql-hackers
Hi,

On Tue, Feb 19, 2019 at 8:20 PM, Euler Taveira wrote:
> Em seg, 18 de fev de 2019 às 19:21, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
> >
> > Euler Taveira <euler@timbira.com.br> writes:
> > > Since no one has stepped up, I took a stab at it. It will prohibit
> > > standard output unless '-f -' be specified. -l option also has the
> > > same restriction.
> >
> > Hm, don't really see the need to break -l usage here.
> >
> After thinking about it, revert it.
> 
> > Pls add to next CF, if you didn't already.
> >
> Done.

I saw the patch.

Is there no need to rewrite the Description in the Doc to state we should specify either -d or -f option?
(and also it might be better to write if -l option is given, neither -d nor -f option isn't necessarily needed.)


I also have the simple question in the code.

I thought the below if-else condition

+    if (filename && strcmp(filename, "-") == 0)
+        fn = fileno(stdout);
+    else if (filename)
         fn = -1;
    else if (AH->FH)

can also be written by the form below.

    if (filename)
    {
        if(strcmp(filename, "-") == 0)
            fn = fileno(stdout);
        else
            fn = -1;
    }
    else if (AH->FH)

I think the former one looks like pretty, but which one is preffered?

--
Yoshikazu Imai


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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: pgsql: Avoid creation of the free space map for small heaprelations, t
Следующее
От: "Nagaura, Ryohei"
Дата:
Сообщение: RE: Timeout parameters