Thread: [doc] clarify behaviour of pg_dump's -t/--table option with non-tables
[doc] clarify behaviour of pg_dump's -t/--table option with non-tables
From
Ian Lawrence Barwick
Date:
Hi Recently I ran into a case where someone was wondering why it was not possible to dump the contents of a view, even though the documentation [1] seems to imply this is possible. Currently it says: Dump only tables with names matching pattern. For this purpose, "table" includes views, materialized views, sequences, and foreign tables. The attached patch attempts to clarify that only definitions of those objects will be dumped, and also mentions that dumping foreign table data requires the --include-foreign-data option. I suggest backpatching any changes to Pg13 where the --include-foreign-data option was added. [1] https://www.postgresql.org/docs/current/app-pgdump.html Regards Ian Barwick -- EnterpriseDB: https://www.enterprisedb.com
Attachment
Re: [doc] clarify behaviour of pg_dump's -t/--table option with non-tables
From
Ian Lawrence Barwick
Date:
2020年10月6日(火) 21:58 Ian Lawrence Barwick <barwick@gmail.com>: > > Hi > > Recently I ran into a case where someone was wondering why it was not > possible to dump the contents of a view, even though the documentation [1] > seems to imply this is possible. > > Currently it says: > > Dump only tables with names matching pattern. For this purpose, "table" > includes views, materialized views, sequences, and foreign tables. > > The attached patch attempts to clarify that only definitions of those objects > will be dumped, and also mentions that dumping foreign table data requires the > --include-foreign-data option. > > I suggest backpatching any changes to Pg13 where the --include-foreign-data > option was added. > > [1] https://www.postgresql.org/docs/current/app-pgdump.html Better version attached. Regards Ian Barwick -- EnterpriseDB: https://www.enterprisedb.com
Attachment
Re: [doc] clarify behaviour of pg_dump's -t/--table option with non-tables
From
Magnus Hagander
Date:
On Tue, Oct 6, 2020 at 2:59 PM Ian Lawrence Barwick <barwick@gmail.com> wrote:
Hi
Recently I ran into a case where someone was wondering why it was not
possible to dump the contents of a view, even though the documentation [1]
seems to imply this is possible.
Currently it says:
Dump only tables with names matching pattern. For this purpose, "table"
includes views, materialized views, sequences, and foreign tables.
The attached patch attempts to clarify that only definitions of those objects
will be dumped, and also mentions that dumping foreign table data requires the
--include-foreign-data option.
I suggest backpatching any changes to Pg13 where the --include-foreign-data
option was added.
LGTM and agreed on the backpatch. Pushed.
Re: [doc] clarify behaviour of pg_dump's -t/--table option with non-tables
From
Magnus Hagander
Date:
On Tue, Oct 6, 2020 at 3:45 PM Ian Lawrence Barwick <barwick@gmail.com> wrote:
2020年10月6日(火) 21:58 Ian Lawrence Barwick <barwick@gmail.com>:
>
> Hi
>
> Recently I ran into a case where someone was wondering why it was not
> possible to dump the contents of a view, even though the documentation [1]
> seems to imply this is possible.
>
> Currently it says:
>
> Dump only tables with names matching pattern. For this purpose, "table"
> includes views, materialized views, sequences, and foreign tables.
>
> The attached patch attempts to clarify that only definitions of those objects
> will be dumped, and also mentions that dumping foreign table data requires the
> --include-foreign-data option.
>
> I suggest backpatching any changes to Pg13 where the --include-foreign-data
> option was added.
>
> [1] https://www.postgresql.org/docs/current/app-pgdump.html
Better version attached.
Argh, perfect timing. I'll update with your new version :)
Re: [doc] clarify behaviour of pg_dump's -t/--table option with non-tables
From
Ian Lawrence Barwick
Date:
2020年10月6日(火) 22:48 Magnus Hagander <magnus@hagander.net>: > > On Tue, Oct 6, 2020 at 3:45 PM Ian Lawrence Barwick <barwick@gmail.com> wrote: >> >> 2020年10月6日(火) 21:58 Ian Lawrence Barwick <barwick@gmail.com>: >> > >> > Hi >> > >> > Recently I ran into a case where someone was wondering why it was not >> > possible to dump the contents of a view, even though the documentation [1] >> > seems to imply this is possible. >> > >> > Currently it says: >> > >> > Dump only tables with names matching pattern. For this purpose, "table" >> > includes views, materialized views, sequences, and foreign tables. >> > >> > The attached patch attempts to clarify that only definitions of those objects >> > will be dumped, and also mentions that dumping foreign table data requires the >> > --include-foreign-data option. >> > >> > I suggest backpatching any changes to Pg13 where the --include-foreign-data >> > option was added. >> > >> > [1] https://www.postgresql.org/docs/current/app-pgdump.html >> >> Better version attached. > > > Argh, perfect timing. I'll update with your new version :) Whoops, wasn't expecting such a quick response. Thanks! FWIW, I sent in another patch suggesting removal of an ancient backwards compatibility "Note" under the same -t/--tables option description [1]. [1] https://www.postgresql.org/message-id/flat/CAB8KJ%3DjYHgnxLLZSNJz7gBTck4TxomngCmGkw3nEMSNF0yL6wA%40mail.gmail.com Regards Ian Barwick -- EnterpriseDB: https://www.enterprisedb.com