From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: possibility to read dumped table's name from file |
Date: | 2020-07-13 06:15:42 |
Message-ID: | CAFj8pRAPjbjjZJ5t1-sp4X1o2fgz1n+nLV044hxJFA4uEfarfw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
ne 12. 7. 2020 v 1:06 odesílatel Justin Pryzby <pryzby(at)telsasoft(dot)com>
napsal:
> On Mon, Jul 06, 2020 at 06:34:15AM +0200, Pavel Stehule wrote:
> > >> > Comment support is still missing but easily added :)
> > >> Still missing from the latest patch.
> > >
> > > I can implement a comment support. But I am not sure about the format.
> The
> >
> > here is support for comment's line - first char should be #
>
> Thanks, that's how I assumed it would look.
>
> > >> With some added documentation, I think this can be RfC.
>
> Do you want to add any more documentation ?
>
done
> Few more things:
>
> > +exit_invalid_filter_format(FILE *fp, char *filename, char *message,
> char *line, int lineno)
> > +{
> > + pg_log_error("invalid format of filter file \"%s\": %s",
> > + *filename == '-' ? "stdin" : filename,
> > + message);
>
> You refer to as "stdin" any filename beginning with -.
>
> I think you could just print "-" and not "stdin".
> In any case, *filename=='-' is wrong since it only checks filename[0].
> In a few places you compare ==stdin (which is right).
>
done
> Also, I think "f" isn't as good a name as "fp".
>
done
> You're adding 139 lines to a 600 line main(), and no other option is more
> than
> 15 lines. Would you put it in a separate function ?
>
done
please, check attached patch
Regards
Pavel
> --
> Justin
>
Attachment | Content-Type | Size |
---|---|---|
pg_dump-filter-20200713-1.patch | text/x-patch | 9.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2020-07-13 06:34:06 | Re: Don't choke on files that are removed while pg_rewind runs. |
Previous Message | Jürgen Purtz | 2020-07-13 06:15:20 | Re: Additional Chapter for Tutorial |