patch for allowing multiple -t options to pg_dump

Started by Andreas Joseph Kroghover 21 years ago7 messages
#1Andreas Joseph Krogh
andreak@officenet.no

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I've prepared a patch(against CVS HEAD of today) to pg_dump.c to
make pg_dump understand multiple -t options for dumping multiple tables
in one command.
Eks:
pg_dump -t table1 -t table2 -t table3 <dbname>

The patch is here:
http://home.officenet.no/~andreak/pg_dump.patch

Any comments, flames?

Is it too late for it to make it into 7.5? I submitted a patch against
7.4 a while ago, but was then told it had to wait until 7.5, and, well,
now it's 7.5-time:-)

- --
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
- ------------------------+---------------------------------------------+
OfficeNet AS | - a tool should do one job, and do it well. |
Hoffsveien 17 | |
PO. Box 425 Sk�yen | |
0213 Oslo | |
NORWAY | |
Phone : +47 22 13 01 00 | |
Direct: +47 22 13 10 03 | |
Mobile: +47 909 56 963 | |
- ------------------------+---------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA7ok9UopImDh2gfQRAmZRAKCUC1H0+7IA3xt9fa385VO9lX4g6wCdEkcO
2htbeud7zilIw6uMYUD35qM=
=C7Cc
-----END PGP SIGNATURE-----

#2Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Andreas Joseph Krogh (#1)
Re: patch for allowing multiple -t options to pg_dump

Andreas Joseph Krogh wrote:
[ PGP not available, raw data follows ]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I've prepared a patch(against CVS HEAD of today) to pg_dump.c to
make pg_dump understand multiple -t options for dumping multiple tables
in one command.
Eks:
pg_dump -t table1 -t table2 -t table3 <dbname>

The patch is here:
http://home.officenet.no/~andreak/pg_dump.patch

Any comments, flames?

Is it too late for it to make it into 7.5? I submitted a patch against
7.4 a while ago, but was then told it had to wait until 7.5, and, well,
now it's 7.5-time:-)

Uh, I see your patch posted on July 6. Is that the one? We started a
feature freeze on July 1.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Scott Marlowe
smarlowe@qwest.net
In reply to: Bruce Momjian (#2)
Re: patch for allowing multiple -t options to pg_dump

On Sun, 2004-07-11 at 19:00, Bruce Momjian wrote:

Andreas Joseph Krogh wrote:
[ PGP not available, raw data follows ]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I've prepared a patch(against CVS HEAD of today) to pg_dump.c to
make pg_dump understand multiple -t options for dumping multiple tables
in one command.
Eks:
pg_dump -t table1 -t table2 -t table3 <dbname>

The patch is here:
http://home.officenet.no/~andreak/pg_dump.patch

Any comments, flames?

Is it too late for it to make it into 7.5? I submitted a patch against
7.4 a while ago, but was then told it had to wait until 7.5, and, well,
now it's 7.5-time:-)

Uh, I see your patch posted on July 6. Is that the one? We started a
feature freeze on July 1.

Is this a feature or a bug fix? I'd say it's more of a bug fix, since
multiple -t switches seems like an obvious thing to support. Now, if we
were adding wild card matching that would seem like an enhancement. I
can't imagine this patch is more than a dozen lines or so. And I can't
imagine it impacting anything else going on right now.

#4Andreas Joseph Krogh
andreak@officenet.no
In reply to: Scott Marlowe (#3)
Re: patch for allowing multiple -t options to pg_dump

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Scott Marlowe wrote:
| On Sun, 2004-07-11 at 19:00, Bruce Momjian wrote:
|
|>Andreas Joseph Krogh wrote:
|>[ PGP not available, raw data follows ]
|>
|>>-----BEGIN PGP SIGNED MESSAGE-----
|>>Hash: SHA1
|>>
|>>Hi, I've prepared a patch(against CVS HEAD of today) to pg_dump.c to
|>>make pg_dump understand multiple -t options for dumping multiple tables
|>>in one command.
|>>Eks:
|>>pg_dump -t table1 -t table2 -t table3 <dbname>
|>>
|>>The patch is here:
|>>http://home.officenet.no/~andreak/pg_dump.patch
|>>
|>>Any comments, flames?
|>>
|>>Is it too late for it to make it into 7.5? I submitted a patch against
|>>7.4 a while ago, but was then told it had to wait until 7.5, and, well,
|>>now it's 7.5-time:-)
|>
|>Uh, I see your patch posted on July 6. Is that the one? We started a
|>feature freeze on July 1.
|
|
| Is this a feature or a bug fix? I'd say it's more of a bug fix, since
| multiple -t switches seems like an obvious thing to support. Now, if we
| were adding wild card matching that would seem like an enhancement. I
| can't imagine this patch is more than a dozen lines or so. And I can't
| imagine it impacting anything else going on right now.

I agree that it's more a bugfix than a feature, and yes, it's not a big
patch, so it should be fairy safe.

- --
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
- ------------------------+---------------------------------------------+
OfficeNet AS | - a tool should do one job, and do it well. |
Hoffsveien 17 | |
PO. Box 425 Sk�yen | |
0213 Oslo | |
NORWAY | |
Phone : +47 22 13 01 00 | |
Direct: +47 22 13 10 03 | |
Mobile: +47 909 56 963 | |
- ------------------------+---------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA8kmmUopImDh2gfQRAm3pAJ90/AXtxeZGPJpk7uEb7d6qsOCGtwCeK0+y
vbZ1YMuhnxdcr4w10EKLN9A=
=uSAs
-----END PGP SIGNATURE-----

#5Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Andreas Joseph Krogh (#1)
Re: patch for allowing multiple -t options to pg_dump

Looks like someone else also just submitted the same patch, except with
a -T option to exclude tables. I will consider that version instead.

---------------------------------------------------------------------------

Andreas Joseph Krogh wrote:
[ PGP not available, raw data follows ]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I've prepared a patch(against CVS HEAD of today) to pg_dump.c to
make pg_dump understand multiple -t options for dumping multiple tables
in one command.
Eks:
pg_dump -t table1 -t table2 -t table3 <dbname>

The patch is here:
http://home.officenet.no/~andreak/pg_dump.patch

Any comments, flames?

Is it too late for it to make it into 7.5? I submitted a patch against
7.4 a while ago, but was then told it had to wait until 7.5, and, well,
now it's 7.5-time:-)

- --
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
- ------------------------+---------------------------------------------+
OfficeNet AS | - a tool should do one job, and do it well. |
Hoffsveien 17 | |
PO. Box 425 Sk���yen | |
0213 Oslo | |
NORWAY | |
Phone : +47 22 13 01 00 | |
Direct: +47 22 13 10 03 | |
Mobile: +47 909 56 963 | |
- ------------------------+---------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA7ok9UopImDh2gfQRAmZRAKCUC1H0+7IA3xt9fa385VO9lX4g6wCdEkcO
2htbeud7zilIw6uMYUD35qM=
=C7Cc
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

[ End of raw data]

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#6Andreas Joseph Krogh
andreak@officenet.no
In reply to: Bruce Momjian (#5)
Re: patch for allowing multiple -t options to pg_dump

On Tuesday 20 July 2004 05:54, Bruce Momjian wrote:

Looks like someone else also just submitted the same patch, except with
a -T option to exclude tables. I will consider that version instead.

I can certainly see how that -T option is valuable, but I think multiple -t
options also make sense if you just want to dump 2 or 3 tables in a database
containing lots of tables. Why not include both?

--
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
------------------------+---------------------------------------------+
OfficeNet AS | - a tool should do one job, and do it well. |
Hoffsveien 17 | |
PO. Box 425 Skøyen | |
0213 Oslo | |
NORWAY | |
Phone : +47 22 13 01 00 | |
Direct: +47 22 13 10 03 | |
Mobile: +47 909 56 963 | |
------------------------+---------------------------------------------+

#7Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Andreas Joseph Krogh (#6)
Re: patch for allowing multiple -t options to pg_dump

His patch has multiple -t options and -T.

---------------------------------------------------------------------------

Andreas Joseph Krogh wrote:
-- Start of PGP signed section.

On Tuesday 20 July 2004 05:54, Bruce Momjian wrote:

Looks like someone else also just submitted the same patch, except with
a -T option to exclude tables. I will consider that version instead.

I can certainly see how that -T option is valuable, but I think multiple -t
options also make sense if you just want to dump 2 or 3 tables in a database
containing lots of tables. Why not include both?

--
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
------------------------+---------------------------------------------+
OfficeNet AS | - a tool should do one job, and do it well. |
Hoffsveien 17 | |
PO. Box 425 Sk?yen | |
0213 Oslo | |
NORWAY | |
Phone : +47 22 13 01 00 | |
Direct: +47 22 13 10 03 | |
Mobile: +47 909 56 963 | |
------------------------+---------------------------------------------+

-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073