RE: proposal: pg_restore --convert-to-text - Mailing list pgsql-hackers

From José Arthur Benetasso Villanova
Subject RE: proposal: pg_restore --convert-to-text
Date
Msg-id alpine.LFD.2.21.1903060754390.19411@dreamer.home.benetasso.com
Whole thread Raw
In response to RE: proposal: pg_restore --convert-to-text  ("Imai, Yoshikazu" <imai.yoshikazu@jp.fujitsu.com>)
Responses RE: proposal: pg_restore --convert-to-text
RE: proposal: pg_restore --convert-to-text
List pgsql-hackers

On Thu, 28 Feb 2019, Imai, Yoshikazu wrote:

> 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.)

Since the default part of text was removed, looks ok to me.


> 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?

Aside the above question, I tested the code against a up-to-date 
repository. It compiled, worked as expected and passed all tests.

--
Jose Arthur Benetasso Villanova


pgsql-hackers by date:

Previous
From: Sergei Kornilov
Date:
Subject: Re: pg_basebackup against older server versions
Next
From: Antonin Houska
Date:
Subject: openLogOff is not needed anymore