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

2023-11-30 Thread Pavel Stehule
čt 30. 11. 2023 v 14:05 odesílatel Daniel Gustafsson napsal: > > On 30 Nov 2023, at 07:13, Pavel Stehule wrote: > > čt 30. 11. 2023 v 4:40 odesílatel Tom Lane t...@sss.pgh.pa.us>> napsal: > > Daniel Gustafsson mailto:dan...@yesql.se>> writes: > > > I took another look at this, found some more

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

2023-11-30 Thread Daniel Gustafsson
> On 30 Nov 2023, at 07:13, Pavel Stehule wrote: > čt 30. 11. 2023 v 4:40 odesílatel Tom Lane > napsal: > Daniel Gustafsson mailto:dan...@yesql.se>> writes: > > I took another look at this, found some more polish that was needed, added > > another testcase and ended up

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

2023-11-29 Thread Pavel Stehule
Hi čt 30. 11. 2023 v 4:40 odesílatel Tom Lane napsal: > Daniel Gustafsson writes: > > I took another look at this, found some more polish that was needed, > added > > another testcase and ended up pushing it. > > mamba is unhappy because this uses functions without > casting their arguments

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

2023-11-29 Thread Tom Lane
Daniel Gustafsson writes: > I took another look at this, found some more polish that was needed, added > another testcase and ended up pushing it. mamba is unhappy because this uses functions without casting their arguments to unsigned char:

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

2023-11-29 Thread Pavel Stehule
Hi st 29. 11. 2023 v 15:44 odesílatel Daniel Gustafsson napsal: > > On 22 Nov 2023, at 05:27, Erik Rijkers wrote: > > > > Op 11/21/23 om 22:10 schreef Daniel Gustafsson: > >>> On 20 Nov 2023, at 06:20, Pavel Stehule > wrote: > > > >> The attached is pretty close to a committable patch IMO,

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

2023-11-29 Thread Daniel Gustafsson
> On 22 Nov 2023, at 05:27, Erik Rijkers wrote: > > Op 11/21/23 om 22:10 schreef Daniel Gustafsson: >>> On 20 Nov 2023, at 06:20, Pavel Stehule wrote: > >> The attached is pretty close to a committable patch IMO, review is welcome on >> both the patch and commit message. I tried to identify

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

2023-11-21 Thread Erik Rijkers
Op 11/21/23 om 22:10 schreef Daniel Gustafsson: On 20 Nov 2023, at 06:20, Pavel Stehule wrote: The attached is pretty close to a committable patch IMO, review is welcome on both the patch and commit message. I tried to identify all reviewers over the past 3+ years but I might have missed

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

2023-11-21 Thread Daniel Gustafsson
> On 20 Nov 2023, at 06:20, Pavel Stehule wrote: > I was pondering replacing the is_include handling with returning an enum for > the operation, to keep things more future proof in case we add more operations > (and also a bit less magic IMHO). > > +1 > > I did it. Nice, I think it's an

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

2023-11-19 Thread Pavel Stehule
Hi I was pondering replacing the is_include handling with returning an enum for >> the operation, to keep things more future proof in case we add more >> operations >> (and also a bit less magic IMHO). >> > > +1 > I did it. Regards Pavel > > Pavel > > >> -- >> Daniel Gustafsson >> >> From

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

2023-11-13 Thread Pavel Stehule
po 13. 11. 2023 v 14:39 odesílatel Daniel Gustafsson napsal: > > On 13 Nov 2023, at 14:15, Pavel Stehule wrote: > > > > Hi > > > > ne 12. 11. 2023 v 14:17 odesílatel Pavel Stehule < > pavel.steh...@gmail.com > napsal: > > Hi > > > > > > What are your thoughts on

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

2023-11-13 Thread Daniel Gustafsson
> On 13 Nov 2023, at 14:15, Pavel Stehule wrote: > > Hi > > ne 12. 11. 2023 v 14:17 odesílatel Pavel Stehule > napsal: > Hi > > > What are your thoughts on this version? It's not in a committable state as it > needs a bit more comments here and there and a

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

2023-11-13 Thread Pavel Stehule
Hi ne 12. 11. 2023 v 14:17 odesílatel Pavel Stehule napsal: > Hi > > >> What are your thoughts on this version? It's not in a committable state >> as it >> needs a bit more comments here and there and a triplecheck that nothing >> was >> missed in changing this, but I prefer to get your

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

2023-11-12 Thread Pavel Stehule
Hi > What are your thoughts on this version? It's not in a committable state > as it > needs a bit more comments here and there and a triplecheck that nothing was > missed in changing this, but I prefer to get your thoughts before spending > the > extra time. > I think using pointer to exit

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

2023-11-09 Thread Daniel Gustafsson
I went and had another look at this. The patch has been around for 18 commitfests and is widely considered to add a good feature, so it seems about time to get reach closure. As I've mentioned in the past I'm not a big fan of the parser, but the thread has overruled on that. Another thing I

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

2023-09-11 Thread Pavel Stehule
Hi po 11. 9. 2023 v 6:57 odesílatel Pavel Stehule napsal: > Hi > > po 11. 9. 2023 v 6:34 odesílatel Pavel Stehule > napsal: > >> Hi >> >> only rebase >> > > Unfortunately this rebase was not correct. I am sorry. > > fixed version > and fixed forgotten "break" in switch Regards Pavel > >

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

2023-09-10 Thread Pavel Stehule
Hi po 11. 9. 2023 v 6:34 odesílatel Pavel Stehule napsal: > Hi > > only rebase > Unfortunately this rebase was not correct. I am sorry. fixed version Regards Pavel > > Regards > > Pavel > > From 32ea3d180ccd976b266bb48c5445c96a1aaf7a54 Mon Sep 17 00:00:00 2001 From: "ok...@github.com"

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

2023-09-10 Thread Pavel Stehule
Hi only rebase Regards Pavel From b62d99f51da03b1fb8dae577fc49420bf36a3bad Mon Sep 17 00:00:00 2001 From: "ok...@github.com" Date: Thu, 16 Mar 2023 08:18:08 +0100 Subject: [PATCH] possibility to read options for dump from file --- doc/src/sgml/ref/pg_dump.sgml | 114

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

2023-03-21 Thread Pavel Stehule
út 21. 3. 2023 v 16:32 odesílatel Justin Pryzby napsal: > On Mon, Mar 20, 2023 at 08:01:13AM +0100, Pavel Stehule wrote: > > ne 19. 3. 2023 v 15:01 odesílatel Justin Pryzby > napsal: > > > > > On Thu, Mar 16, 2023 at 01:05:41PM +0100, Pavel Stehule wrote: > > > > rebase + enhancing about

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

2023-03-21 Thread Pavel Stehule
út 21. 3. 2023 v 16:32 odesílatel Justin Pryzby napsal: > On Mon, Mar 20, 2023 at 08:01:13AM +0100, Pavel Stehule wrote: > > ne 19. 3. 2023 v 15:01 odesílatel Justin Pryzby > napsal: > > > > > On Thu, Mar 16, 2023 at 01:05:41PM +0100, Pavel Stehule wrote: > > > > rebase + enhancing about

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

2023-03-21 Thread Justin Pryzby
On Mon, Mar 20, 2023 at 08:01:13AM +0100, Pavel Stehule wrote: > ne 19. 3. 2023 v 15:01 odesílatel Justin Pryzby napsal: > > > On Thu, Mar 16, 2023 at 01:05:41PM +0100, Pavel Stehule wrote: > > > rebase + enhancing about related option from a563c24 > > > > Thanks. > > > > It looks like this

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

2023-03-20 Thread Pavel Stehule
ne 19. 3. 2023 v 15:01 odesílatel Justin Pryzby napsal: > On Thu, Mar 16, 2023 at 01:05:41PM +0100, Pavel Stehule wrote: > > rebase + enhancing about related option from a563c24 > > Thanks. > > It looks like this doesn't currently handle extensions, which were added > at 6568cef26e. > > > +

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

2023-03-19 Thread Pavel Stehule
ne 19. 3. 2023 v 15:01 odesílatel Justin Pryzby napsal: > On Thu, Mar 16, 2023 at 01:05:41PM +0100, Pavel Stehule wrote: > > rebase + enhancing about related option from a563c24 > > Thanks. > > It looks like this doesn't currently handle extensions, which were added > at 6568cef26e. > > > +

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

2023-03-19 Thread Justin Pryzby
On Thu, Mar 16, 2023 at 01:05:41PM +0100, Pavel Stehule wrote: > rebase + enhancing about related option from a563c24 Thanks. It looks like this doesn't currently handle extensions, which were added at 6568cef26e. > + table_and_children: tables, works like > + -t/--table,

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

2023-03-18 Thread Pavel Stehule
Hi fresh rebase regards Pavel From 09c64d9a5f2ed033c2691ca25ca6bec23320e1b0 Mon Sep 17 00:00:00 2001 From: "ok...@github.com" Date: Thu, 16 Mar 2023 08:18:08 +0100 Subject: [PATCH] possibility to read options for dump from file --- doc/src/sgml/ref/pg_dump.sgml | 110 +++

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

2023-03-16 Thread Pavel Stehule
út 7. 3. 2023 v 3:47 odesílatel Julien Rouhaud napsal: > Hi, > > On Mon, Mar 06, 2023 at 10:20:32PM +0100, Daniel Gustafsson wrote: > > > On 6 Mar 2023, at 21:45, Gregory Stark (as CFM) > wrote: > > > > > > So This patch has been through a lot of commitfests. And it really > > > doesn't

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

2023-03-06 Thread Julien Rouhaud
Hi, On Mon, Mar 06, 2023 at 10:20:32PM +0100, Daniel Gustafsson wrote: > > On 6 Mar 2023, at 21:45, Gregory Stark (as CFM) wrote: > > > > So This patch has been through a lot of commitfests. And it really > > doesn't seem that hard to resolve -- Pavel has seemingly been willing > > to go

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

2023-03-06 Thread Daniel Gustafsson
> On 6 Mar 2023, at 21:45, Gregory Stark (as CFM) wrote: > > So This patch has been through a lot of commitfests. And it really > doesn't seem that hard to resolve -- Pavel has seemingly been willing > to go along whichever way the wind has been blowing but honestly it > kind of seems like

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

2023-03-06 Thread Gregory Stark (as CFM)
So This patch has been through a lot of commitfests. And it really doesn't seem that hard to resolve -- Pavel has seemingly been willing to go along whichever way the wind has been blowing but honestly it kind of seems like he's just gotten drive-by suggestions and he's put a lot of work into

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

2022-11-22 Thread Pavel Stehule
Hi út 22. 11. 2022 v 8:39 odesílatel Andres Freund napsal: > Hi, > > On 2022-11-13 20:32:47 +0100, Pavel Stehule wrote: > > updated patch attached > > It fails with address sanitizer that's now part of CI: > > https://cirrus-ci.com/task/6031397744279552?logs=test_world#L2659 > > [06:33:11.271]

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

2022-11-21 Thread Pavel Stehule
út 22. 11. 2022 v 8:39 odesílatel Andres Freund napsal: > Hi, > > On 2022-11-13 20:32:47 +0100, Pavel Stehule wrote: > > updated patch attached > > It fails with address sanitizer that's now part of CI: > > https://cirrus-ci.com/task/6031397744279552?logs=test_world#L2659 > > [06:33:11.271] #

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

2022-11-21 Thread Andres Freund
Hi, On 2022-11-13 20:32:47 +0100, Pavel Stehule wrote: > updated patch attached It fails with address sanitizer that's now part of CI: https://cirrus-ci.com/task/6031397744279552?logs=test_world#L2659 [06:33:11.271] # ==31965==ERROR: AddressSanitizer: heap-buffer-overflow on address

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

2022-11-21 Thread Pavel Stehule
út 22. 11. 2022 v 6:26 odesílatel Julien Rouhaud napsal: > Hi, > > On Sun, Nov 13, 2022 at 08:32:47PM +0100, Pavel Stehule wrote: > > > > updated patch attached > > Thanks! > > Some enhancement could probably be done by a native english speaker, but > apart > from that it looks good to me, so

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

2022-11-21 Thread Julien Rouhaud
Hi, On Sun, Nov 13, 2022 at 08:32:47PM +0100, Pavel Stehule wrote: > > updated patch attached Thanks! Some enhancement could probably be done by a native english speaker, but apart from that it looks good to me, so hearing no other complaints I'm marking the CF entry as Ready for Committer!

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

2022-11-13 Thread Pavel Stehule
ne 13. 11. 2022 v 9:58 odesílatel Julien Rouhaud napsal: > On Sat, Nov 12, 2022 at 09:35:59PM +0100, Pavel Stehule wrote: > > Thanks for the updated patch. Apart from the function comment it looks > good to > me. > > Justin, did you have any other comment on the patch? > > > > I don't fully

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

2022-11-13 Thread Julien Rouhaud
On Sat, Nov 12, 2022 at 09:35:59PM +0100, Pavel Stehule wrote: Thanks for the updated patch. Apart from the function comment it looks good to me. Justin, did you have any other comment on the patch? > > I don't fully understand the part about subpatterns, but is that necessary > > to > >

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

2022-11-12 Thread Pavel Stehule
Hi and updated patch Regards Pavel diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index 8b9d9f4cad..d5a6e2c7ee 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -779,6 +779,80 @@ PostgreSQL documentation + +

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

2022-11-12 Thread Pavel Stehule
pá 11. 11. 2022 v 9:11 odesílatel Julien Rouhaud napsal: > Hi, > > On Sat, Nov 05, 2022 at 08:54:57PM +0100, Pavel Stehule wrote: > > > > pá 4. 11. 2022 v 14:28 odesílatel Julien Rouhaud > > napsal: > > > > > > But one thing I noticed is that "optarg" looks wrong here: > > > > > > > >

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

2022-11-11 Thread Julien Rouhaud
Hi, On Sat, Nov 05, 2022 at 08:54:57PM +0100, Pavel Stehule wrote: > > pá 4. 11. 2022 v 14:28 odesílatel Julien Rouhaud > napsal: > > > > But one thing I noticed is that "optarg" looks wrong here: > > > > > > simple_string_list_append(>triggerNames, optarg); > > > > Ah indeed, good catch! Maybe

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

2022-11-05 Thread Pavel Stehule
Hi pá 4. 11. 2022 v 14:28 odesílatel Julien Rouhaud napsal: > On Fri, Nov 04, 2022 at 07:19:27AM -0500, Justin Pryzby wrote: > > On Fri, Nov 04, 2022 at 07:59:01PM +0800, Julien Rouhaud wrote: > > > On Thu, Nov 03, 2022 at 10:22:15PM +0100, Pavel Stehule wrote: > > > > čt 3. 11. 2022 v 5:09

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

2022-11-04 Thread Julien Rouhaud
On Fri, Nov 04, 2022 at 02:37:05PM +0100, Pavel Stehule wrote: > pá 4. 11. 2022 v 14:28 odesílatel Julien Rouhaud > napsal: > > > > > > > But one thing I noticed is that "optarg" looks wrong here: > > > > > > simple_string_list_append(>triggerNames, optarg); > > > > Ah indeed, good catch! Maybe

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

2022-11-04 Thread Pavel Stehule
pá 4. 11. 2022 v 14:28 odesílatel Julien Rouhaud napsal: > On Fri, Nov 04, 2022 at 07:19:27AM -0500, Justin Pryzby wrote: > > On Fri, Nov 04, 2022 at 07:59:01PM +0800, Julien Rouhaud wrote: > > > On Thu, Nov 03, 2022 at 10:22:15PM +0100, Pavel Stehule wrote: > > > > čt 3. 11. 2022 v 5:09

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

2022-11-04 Thread Julien Rouhaud
On Fri, Nov 04, 2022 at 07:19:27AM -0500, Justin Pryzby wrote: > On Fri, Nov 04, 2022 at 07:59:01PM +0800, Julien Rouhaud wrote: > > On Thu, Nov 03, 2022 at 10:22:15PM +0100, Pavel Stehule wrote: > > > čt 3. 11. 2022 v 5:09 odesílatel Julien Rouhaud > > > napsal: > > > updated patch attached > >

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

2022-11-04 Thread Justin Pryzby
On Fri, Nov 04, 2022 at 07:59:01PM +0800, Julien Rouhaud wrote: > On Thu, Nov 03, 2022 at 10:22:15PM +0100, Pavel Stehule wrote: > > čt 3. 11. 2022 v 5:09 odesílatel Julien Rouhaud napsal: > > updated patch attached > > > > big thanks for these comments and tips > > Thanks for the updated patch!

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

2022-11-04 Thread Julien Rouhaud
On Thu, Nov 03, 2022 at 10:22:15PM +0100, Pavel Stehule wrote: > čt 3. 11. 2022 v 5:09 odesílatel Julien Rouhaud napsal: > > > > > Is there any interest with the initial pg_strip_crlf? AFAICT all the rest > > of > > the code will ignore such caracters using isspace() so it wouldn't change > >

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

2022-11-03 Thread Pavel Stehule
čt 3. 11. 2022 v 5:09 odesílatel Julien Rouhaud napsal: > Hi, > > On Wed, Oct 26, 2022 at 06:26:26AM +0200, Pavel Stehule wrote: > > > > út 18. 10. 2022 v 11:33 odesílatel Julien Rouhaud > > napsal: > > > > > > > > I'm wondering if psql's parse_identifier() could be exported and reused > > >

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

2022-11-02 Thread Julien Rouhaud
Hi, On Wed, Oct 26, 2022 at 06:26:26AM +0200, Pavel Stehule wrote: > > út 18. 10. 2022 v 11:33 odesílatel Julien Rouhaud > napsal: > > > > > I'm wondering if psql's parse_identifier() could be exported and reused > > here > > rather than creating yet another version. > > > > I looked there, and

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

2022-10-25 Thread Pavel Stehule
Hi út 18. 10. 2022 v 11:33 odesílatel Julien Rouhaud napsal: > On Thu, Oct 13, 2022 at 11:46:34AM -0700, Andres Freund wrote: > > Hi, > > > > On 2022-10-07 07:26:08 +0200, Pavel Stehule wrote: > > > I am sending version with handy written parser and meson support > > > > Given this is a new

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

2022-10-18 Thread Julien Rouhaud
On Thu, Oct 13, 2022 at 11:46:34AM -0700, Andres Freund wrote: > Hi, > > On 2022-10-07 07:26:08 +0200, Pavel Stehule wrote: > > I am sending version with handy written parser and meson support > > Given this is a new approach it seems inaccurate to have the CF entry marked > ready-for-committer.

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

2022-10-13 Thread Andres Freund
Hi, On 2022-10-07 07:26:08 +0200, Pavel Stehule wrote: > I am sending version with handy written parser and meson support Given this is a new approach it seems inaccurate to have the CF entry marked ready-for-committer. I've updated it to needs-review. Greetings, Andres Freund

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

2022-10-07 Thread Pavel Stehule
pá 7. 10. 2022 v 16:03 odesílatel Julien Rouhaud napsal: > On Fri, Oct 07, 2022 at 07:26:08AM +0200, Pavel Stehule wrote: > > > > I checked this code again, and I don't think some refactoring is easy. > > getFiltersFromFile is not duplicated. It is just probably badly named. > > > > These

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

2022-10-07 Thread Julien Rouhaud
On Fri, Oct 07, 2022 at 07:26:08AM +0200, Pavel Stehule wrote: > > I checked this code again, and I don't think some refactoring is easy. > getFiltersFromFile is not duplicated. It is just probably badly named. > > These routines are used from pg_dump, pg_dumpall and pg_restore. There are >

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

2022-10-06 Thread Pavel Stehule
Hi I am sending version with handy written parser and meson support po 3. 10. 2022 v 6:34 odesílatel Julien Rouhaud napsal: > Hi, > > > You started rewriting it, but you didn't finish it. > > > > Unfortunately, there is not a clean opinion on using bison's parser for > > this purpose. I

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

2022-10-02 Thread Julien Rouhaud
Hi, On Mon, Oct 03, 2022 at 06:00:12AM +0200, Pavel Stehule wrote: > ne 2. 10. 2022 v 22:52 odesílatel Daniel Gustafsson > napsal: > > > > On 2 Oct 2022, at 18:04, Andres Freund wrote: > > > On 2022-10-02 00:19:59 -0700, Andres Freund wrote: > > >> On 2022-10-01 23:56:59 -0700, Andres Freund

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

2022-10-02 Thread Pavel Stehule
ne 2. 10. 2022 v 22:52 odesílatel Daniel Gustafsson napsal: > > On 2 Oct 2022, at 18:04, Andres Freund wrote: > > On 2022-10-02 00:19:59 -0700, Andres Freund wrote: > >> On 2022-10-01 23:56:59 -0700, Andres Freund wrote: > >>> On 2022-09-12 09:58:37 +0200, Daniel Gustafsson wrote: >

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

2022-10-02 Thread Andres Freund
On 2022-10-02 22:52:33 +0200, Daniel Gustafsson wrote: > The parser in the original submission was -1'd by me, and the current version > proposed as an alternative. This was subsequently -1'd as well but no updated > patch with a rewritten parser has been posted. So this is now stalled again. >

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

2022-10-02 Thread Tom Lane
Daniel Gustafsson writes: > On 2 Oct 2022, at 18:04, Andres Freund wrote: >> c.h (and postgres.h, postgres_fe.h) shouldn't be included in headers. >> This is a common enough mistake that I'm wondering if we could automate >> warning about it somehow. > Maybe we can add a simple git grep

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

2022-10-02 Thread Daniel Gustafsson
> On 2 Oct 2022, at 18:04, Andres Freund wrote: > On 2022-10-02 00:19:59 -0700, Andres Freund wrote: >> On 2022-10-01 23:56:59 -0700, Andres Freund wrote: >>> On 2022-09-12 09:58:37 +0200, Daniel Gustafsson wrote: Correct, fixed in the attached. >>> >>> Updated patch adding meson

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

2022-10-02 Thread Andres Freund
Hi, On 2022-10-02 00:19:59 -0700, Andres Freund wrote: > On 2022-10-01 23:56:59 -0700, Andres Freund wrote: > > On 2022-09-12 09:58:37 +0200, Daniel Gustafsson wrote: > > > Correct, fixed in the attached. > > > > Updated patch adding meson compatibility attached. > > Err, forgot to amend one

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

2022-10-02 Thread Andres Freund
Hi, On 2022-10-01 23:56:59 -0700, Andres Freund wrote: > On 2022-09-12 09:58:37 +0200, Daniel Gustafsson wrote: > > Correct, fixed in the attached. > > Updated patch adding meson compatibility attached. Err, forgot to amend one hunk :( Greetings, Andres Freund >From

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

2022-10-02 Thread Andres Freund
Hi, On 2022-09-12 09:58:37 +0200, Daniel Gustafsson wrote: > Correct, fixed in the attached. Updated patch adding meson compatibility attached. Greetings, Andres Freund >From 5d3ba4d2d6567626ccc0019208ea4c0ea91ac866 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Wed, 7 Sep 2022

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

2022-09-22 Thread Andres Freund
Hi, On 2022-09-12 09:58:37 +0200, Daniel Gustafsson wrote: > > On 9 Sep 2022, at 11:00, Andrew Dunstan wrote: > > > >> On Sep 9, 2022, at 5:53 PM, John Naylor > >> wrote: > >> > >> Note that the grammar has shift-reduce conflicts. > > > Looks like the last rule for Filters should not be

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

2022-09-13 Thread Pavel Stehule
út 13. 9. 2022 v 10:46 odesílatel John Naylor napsal: > On Mon, Sep 12, 2022 at 8:10 PM Pavel Stehule > wrote: > > > > po 12. 9. 2022 v 9:59 odesílatel Daniel Gustafsson > napsal: > >> I don't the capabilities of the tool is all that interesting compared > to the > >> long term maintainability

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

2022-09-13 Thread John Naylor
On Mon, Sep 12, 2022 at 8:10 PM Pavel Stehule wrote: > > po 12. 9. 2022 v 9:59 odesílatel Daniel Gustafsson napsal: >> I don't the capabilities of the tool is all that interesting compared to the >> long term maintainability and readability of the source code. With make distprep and

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

2022-09-12 Thread Erik Rijkers
Op 12-09-2022 om 16:00 schreef Erik Rijkers: Op 12-09-2022 om 09:58 schreef Daniel Gustafsson: On 9 Sep 2022, at 11:00, Andrew Dunstan wrote: On Sep 9, 2022, at 5:53 PM, John Naylor wrote: [v4-0001-Add-include-exclude-filtering-via-file-in-pg_dump.patch] I noticed that pg_restore

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

2022-09-12 Thread Erik Rijkers
Op 12-09-2022 om 09:58 schreef Daniel Gustafsson: On 9 Sep 2022, at 11:00, Andrew Dunstan wrote: On Sep 9, 2022, at 5:53 PM, John Naylor wrote: [v4-0001-Add-include-exclude-filtering-via-file-in-pg_dump.patch] I noticed that pg_restore --filter cannot, or at last not always, be used

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

2022-09-12 Thread Pavel Stehule
po 12. 9. 2022 v 9:59 odesílatel Daniel Gustafsson napsal: > > On 9 Sep 2022, at 11:00, Andrew Dunstan wrote: > > > >> On Sep 9, 2022, at 5:53 PM, John Naylor > wrote: > >> > >> Note that the grammar has shift-reduce conflicts. > > > Looks like the last rule for Filters should not be there. >

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

2022-09-12 Thread Daniel Gustafsson
> On 9 Sep 2022, at 11:00, Andrew Dunstan wrote: > >> On Sep 9, 2022, at 5:53 PM, John Naylor wrote: >> >> Note that the grammar has shift-reduce conflicts. > Looks like the last rule for Filters should not be there. Correct, fixed in the attached. > I do wonder whether we should be using

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

2022-09-09 Thread Andrew Dunstan
> On Sep 9, 2022, at 5:53 PM, John Naylor wrote: > > On Thu, Sep 8, 2022 at 7:32 PM Daniel Gustafsson wrote: >> [v3] > > Note that the grammar has shift-reduce conflicts. If you run a fairly > recent Bison, you can show them like this: > > bison -Wno-deprecated -Wcounterexamples -d -o

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

2022-09-09 Thread John Naylor
On Thu, Sep 8, 2022 at 7:32 PM Daniel Gustafsson wrote: > [v3] Note that the grammar has shift-reduce conflicts. If you run a fairly recent Bison, you can show them like this: bison -Wno-deprecated -Wcounterexamples -d -o filterparse.c filterparse.y filterparse.y: warning: 2 shift/reduce

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

2022-09-08 Thread Pavel Stehule
Hi st 7. 9. 2022 v 21:46 odesílatel Daniel Gustafsson napsal: > As noted upthread at some point, I'm not overly excited about the parser in > filter.c, for maintainability and readability reasons. So, I've > reimplemented > the parser in Flex/Bison in the attached patch, which IMHO provides a

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

2022-09-08 Thread Daniel Gustafsson
> On 8 Sep 2022, at 13:44, Julien Rouhaud wrote: > On Thu, Sep 08, 2022 at 01:38:42PM +0200, Daniel Gustafsson wrote: >>> On 8 Sep 2022, at 12:00, Erik Rijkers wrote: >>> I did notice one peculiarity (in your patch) where for each table a few >>> spaces are omitted by pg_dump. >> >> Right, I

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

2022-09-08 Thread Julien Rouhaud
Hi, On Thu, Sep 08, 2022 at 01:38:42PM +0200, Daniel Gustafsson wrote: > > On 8 Sep 2022, at 12:00, Erik Rijkers wrote: > > > > Op 07-09-2022 om 21:45 schreef Daniel Gustafsson: > >> One thing this patchversion currently lacks is refined error messaging, > >> but if > >> we feel that this

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

2022-09-08 Thread Daniel Gustafsson
> On 8 Sep 2022, at 12:00, Erik Rijkers wrote: > > Op 07-09-2022 om 21:45 schreef Daniel Gustafsson: >> One thing this patchversion currently lacks is refined error messaging, but >> if >> we feel that this approach is a viable path then that can be tweaked. The >> function which starts the

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

2022-09-08 Thread Erik Rijkers
Op 07-09-2022 om 21:45 schreef Daniel Gustafsson: One thing this patchversion currently lacks is refined error messaging, but if we feel that this approach is a viable path then that can be tweaked. The function which starts the parser can also be refactored to be shared across pg_dump,

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

2022-09-07 Thread Daniel Gustafsson
As noted upthread at some point, I'm not overly excited about the parser in filter.c, for maintainability and readability reasons. So, I've reimplemented the parser in Flex/Bison in the attached patch, which IMHO provides a clear(er) picture of the grammar and is more per project standards. This

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

2022-08-22 Thread Pavel Stehule
Hi I am sending fresh rebase + enhancing tests for pg_dumpall and pg_restore Regards Pavel diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index c08276bc0a..b64bae6987 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -779,6 +779,80 @@

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

2022-07-18 Thread Pavel Stehule
ne 17. 7. 2022 v 16:01 odesílatel Justin Pryzby napsal: > Thanks for updating the patch. > > This failed to build on windows. > http://cfbot.cputube.org/pavel-stehule.html > > Yes, there was a significant problem with the function exit_nicely, that is differently implemented in pg_dump and

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

2022-07-17 Thread Justin Pryzby
Thanks for updating the patch. This failed to build on windows. http://cfbot.cputube.org/pavel-stehule.html Some more comments inline. On Sun, Jul 17, 2022 at 08:20:47AM +0200, Pavel Stehule wrote: > The attached patch implements the --filter option for pg_dumpall and for > pg_restore too. >

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

2022-07-17 Thread Pavel Stehule
Hi čt 14. 7. 2022 v 6:54 odesílatel Pavel Stehule napsal: > > > st 13. 7. 2022 v 22:49 odesílatel Andrew Dunstan > napsal: > >> >> On 2022-04-25 Mo 13:39, Pavel Stehule wrote: >> > Hi >> > >> > fresh rebase >> > >> > >> >> >> If we're going to do this for pg_dump's include/exclude options, >>

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

2022-07-13 Thread Pavel Stehule
st 13. 7. 2022 v 22:49 odesílatel Andrew Dunstan napsal: > > On 2022-04-25 Mo 13:39, Pavel Stehule wrote: > > Hi > > > > fresh rebase > > > > > > > If we're going to do this for pg_dump's include/exclude options, > shouldn't we also provide an equivalent facility for pg_dumpall's >

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

2022-07-13 Thread Andrew Dunstan
On 2022-04-25 Mo 13:39, Pavel Stehule wrote: > Hi > > fresh rebase > > If we're going to do this for pg_dump's include/exclude options, shouldn't we also provide an equivalent facility for pg_dumpall's --exclude-database option? cheers andrew -- Andrew Dunstan EDB:

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

2022-04-25 Thread Pavel Stehule
Hi fresh rebase Regards Pavel diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index c946755737..3711959fa2 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -779,6 +779,80 @@ PostgreSQL documentation + +

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

2021-10-27 Thread Pavel Stehule
Hi út 5. 10. 2021 v 14:30 odesílatel Daniel Gustafsson napsal: > > On 1 Oct 2021, at 15:19, Daniel Gustafsson wrote: > > > I'm still not happy with the docs, I need to take another look there and > see if > > I make them more readable but otherwise I don't think there are any open > issues > >

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

2021-10-05 Thread Erik Rijkers
Op 05-10-2021 om 14:30 schreef Daniel Gustafsson: Unless there are objections, I think this is pretty much ready to go in. Agreed. One typo: 'This keyword can only be with the exclude keyword.'should be 'This keyword can only be used with the exclude keyword.' thanks, Erik Rijkers

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

2021-10-05 Thread Pavel Stehule
út 5. 10. 2021 v 14:30 odesílatel Daniel Gustafsson napsal: > > On 1 Oct 2021, at 15:19, Daniel Gustafsson wrote: > > > I'm still not happy with the docs, I need to take another look there and > see if > > I make them more readable but otherwise I don't think there are any open > issues > >

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

2021-10-05 Thread Daniel Gustafsson
> On 1 Oct 2021, at 15:19, Daniel Gustafsson wrote: > I'm still not happy with the docs, I need to take another look there and see > if > I make them more readable but otherwise I don't think there are any open > issues > with this. Attached is a rebased version which has rewritten docs which

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

2021-10-04 Thread Daniel Gustafsson
> On 2 Oct 2021, at 08:18, Erik Rijkers wrote: > So the issue is not as serious as it seemed. This is also not related to this patch in any way, or am I missing a point here? This can just as well be achieved without this patch. > The complaint remaining is only that this could somehow be

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

2021-10-02 Thread Erik Rijkers
On 10/1/21 6:19 PM, Erik Rijkers wrote: On 10/1/21 3:19 PM, Daniel Gustafsson wrote: As has been discussed upthread, this format strikes a compromise wrt simplicity and doesn't preclude adding a more structured config file in the future should If you try to dump/restore a foreign file

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

2021-10-01 Thread Erik Rijkers
On 10/1/21 3:19 PM, Daniel Gustafsson wrote: As has been discussed upthread, this format strikes a compromise wrt simplicity and doesn't preclude adding a more structured config file in the future should we want that. I think this takes care of most comments and opinions made in this thread.

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

2021-10-01 Thread Pavel Stehule
pá 1. 10. 2021 v 15:19 odesílatel Daniel Gustafsson napsal: > I took another pass over this today and touched up the documentation (docs > and > code) as well as tweaked the code a bit here and there to both make it fit > the > pg_dump style better and to clean up a few small things. I've also

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

2021-10-01 Thread Daniel Gustafsson
I took another pass over this today and touched up the documentation (docs and code) as well as tweaked the code a bit here and there to both make it fit the pg_dump style better and to clean up a few small things. I've also added a set of additional tests to cover more of the functionality. I'm

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

2021-09-23 Thread Pavel Stehule
Hi > The above comments are fixed in the attached, as well as a pass over the > docs > and extended tests to actually test matching a foreign server. What do > think > about this version? I'm still not convinced that there aren't more quoting > bugs in the parser, but I've left that intact for

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

2021-09-21 Thread Pavel Stehule
Hi > The above comments are fixed in the attached, as well as a pass over the > docs > and extended tests to actually test matching a foreign server. What do > think > about this version? I'm still not convinced that there aren't more quoting > bugs in the parser, but I've left that intact for

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

2021-09-21 Thread Tomas Vondra
On 9/21/21 3:28 PM, Alvaro Herrera wrote: > I definitely agree that we should have two files, one for config and > another one for filter, since their purposes are orthogonal and their > formats are likely different; trying to cram the filter specification in > the config file seems unfriendly

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

2021-09-21 Thread Alvaro Herrera
I definitely agree that we should have two files, one for config and another one for filter, since their purposes are orthogonal and their formats are likely different; trying to cram the filter specification in the config file seems unfriendly because it'd force users to write the filter in

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

2021-09-21 Thread Pavel Stehule
út 21. 9. 2021 v 14:37 odesílatel Daniel Gustafsson napsal: > > On 21 Sep 2021, at 08:50, Pavel Stehule wrote: > > po 20. 9. 2021 v 14:10 odesílatel Daniel Gustafsson > napsal: > > > + printf(_(" --filter=FILENAMEdump objects and data > based on the

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

2021-09-21 Thread Daniel Gustafsson
> On 21 Sep 2021, at 08:50, Pavel Stehule wrote: > po 20. 9. 2021 v 14:10 odesílatel Daniel Gustafsson > napsal: > + printf(_(" --filter=FILENAMEdump objects and data based > on the filter expressions\n" > +"

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

2021-09-21 Thread Pavel Stehule
po 20. 9. 2021 v 14:10 odesílatel Daniel Gustafsson napsal: > > Will do a closer review on the patch shortly. > > Had a read through, and tested, the latest posted version today: > > +Read objects filters from the specified file. Specify "-" to read from > +stdin. Lines of this file must

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

2021-09-20 Thread Daniel Gustafsson
> Will do a closer review on the patch shortly. Had a read through, and tested, the latest posted version today: +Read objects filters from the specified file. Specify "-" to read from +stdin. Lines of this file must have the following format: I think this should be - and STDIN to match

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

2021-09-17 Thread Pavel Stehule
> > > > Initially not, but now, when I am thinking about it, I don't think so > Bison helps. The syntax of the filter file is nicely linear. Now, the code > of the parser is a little bit larger than minimalistic, but it is due to > nicer error's messages. The raw implementation in Bison raised

  1   2   3   >