![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
On Tue, 20 Jul 2004, Tom Lane wrote: (BTW, does the patch handle multiple -n switches?) No, it doesn't. I can look into that if you like. The patch was entirely to satisfy a need some of our customers have. The -T switch does fill a real need for our customers; our product has a couple of tables that aren't critical if they aren't backed up, but as the product evolves, we occasionally add more tables. So it's easier to use a -T switch to say what *not* to back up, than multiple -t switches to say what to back up. |
#12
| |||
| |||
|
|
No, it doesn't. I can look into that if you like. The patch was entirely to satisfy a need some of our customers have. The -T switch does fill a real need for our customers; our product has a couple of tables that aren't critical if they aren't backed up, but as the product evolves, we occasionally add more tables. So it's easier to use a -T switch to say what *not* to back up, than multiple -t switches to say what to back up. Well, since you wrote the patch, you'd be better off munging it. Read Tom's comments and see what you can come up with. There's been no decision made yet though on what changes to make however. |
#13
| |||
| |||
|
|
On Wed, 21 Jul 2004, Christopher Kings-Lynne wrote: No, it doesn't. I can look into that if you like. The patch was entirely to satisfy a need some of our customers have. The -T switch does fill a real need for our customers; our product has a couple of tables that aren't critical if they aren't backed up, but as the product evolves, we occasionally add more tables. So it's easier to use a -T switch to say what *not* to back up, than multiple -t switches to say what to back up. Well, since you wrote the patch, you'd be better off munging it. Read Tom's comments and see what you can come up with. There's been no decision made yet though on what changes to make however. I'd also move the should_dump.c file into an existing file and make sure the patch is against CVS HEAD, not 7.4.3. |
|
Also, there's a copyright statement at the top, retaining copyright with the author. Does anyone have an issue with that? |
#14
| |||
| |||
|
|
Yes, no need for it. We discourage that. |
|
--________-- PGP key available upon request, | / |
#15
| |||
| |||
|
#16
| |||
| |||
|
|
Hi, This is a response to several messages: 1) Copyright notice: I have no problem having this removed, although it would be nice to credit me somewhere in a comment. |
|
2) I put most of the code in a separate file so that if the patch is rejected, it's easy for me to maintain a forked copy. If the patch is accepted, obviously it can be integrated into an existing file. |
|
3) Multiple -n options: We need to figure out how this would work, and make it non-surprising. Some ideas: pg_dump -t t1 -n s2 -t t2 -t t3 -n s4 -t t5 What does that do? My guess is: - Dump table t1 in any schema - Dump tables t2 and t3 in schema s2 - Dump table t5 in schema s4 So now the position of the options matters! That might surprise people, because: pg_dump -s s1 -t t2 is no longer the same as: pg_dump -t t2 -n s1 What about: pg_dump -t t1 -n s2 Should that dump table t1 in any schema, and any table in schema s2? If we can nail down the semantics, I can implement the patch. The code is very simple. |
#17
| |||
| |||
|
|
Even though I suggested it, I am afraid this is just too confusing an API. |
#18
| |||
| |||
|
|
How about this: pg_dump -t t1 -- Dump table t1 in any schema pg_dump -n s1 -- Dump all of schema s1 pg_dump -t t1 -n s1 -- Dump t1 in s1 pg_dump -t t1 -t t2 -n s1 -- Dump s1.t1 and s1.t2 pg_dump -t t1 -t t2 -n s1 -n s2 -- Dump s1.t1, s1.t2, s2.t1 and s2.t2 |
|
We also probably should not warn about missing tables, because it's likely that the full cartesian product of schemas and tables won't exist. |
#19
| |||
| |||
|
|
pg_dump -t s1.t1 -t s2.t2 -- Dump s1.t1 and s2.t2 |
#20
| |||
| |||
|
|
On Wed, 21 Jul 2004, Tom Lane wrote: pg_dump -t s1.t1 -t s2.t2 -- Dump s1.t1 and s2.t2 That's a good idea, but then it's questionable whether we need the -n switch at all. |
|
It might be simpler to extend the -t switch to accept: pg-dump -t 's1.*' |
![]() |
| Thread Tools | |
| Display Modes | |
| |