Unix Technical Forum

New pg_dump options: exclude tables/schemas, multiple all,wildcards

This is a discussion on New pg_dump options: exclude tables/schemas, multiple all,wildcards within the Pgsql Patches forums, part of the PostgreSQL category; --> Are we any closer to something to apply for this? --------------------------------------------------------------------------- Greg Sabino Mullane wrote: > -----BEGIN PGP SIGNED ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-18-2008, 12:24 AM
Bruce Momjian
 
Posts: n/a
Default Re: New pg_dump options: exclude tables/schemas, multiple


Are we any closer to something to apply for this?

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

Greg Sabino Mullane wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
>
>
> Attached is a patch to hopefully make pg_dump a lot more useful.
> I started out by making it simply able to avoid dumping a single
> table, but, inspired by David Fetter's patch last November, also
> added in support for multiple items and limited wildcard matching.
>
> -n and -N control the schemas, and -t and -T control the tables.
>
> Wildcards can be a star at the start, the end, or on both sides
> of a term. The patch acts inclusively with conflicts: the -t
> option trumps the -N option.
>
> Some examples:
>
> To dump all tables beginning with the string "slony", plus
> all tables with the word "log" inside of them:
>
> pg_dump -t "slony*" -t "*log*"
>
> To dump all schemas except "dev" and "qa", and all tables
> except those ending in "large":
>
> pg_dump -N "dev" -N "qa" -T "*large"
>
> --
> Greg Sabino Mullane greg@turnstep.com
> PGP Key: 0x14964AC8 200601152100
> http://biglumber.com/x/web?pk=2529DF...9B906714964AC8
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFDyv9NvJuQZxSWSsgRAup9AKD110JJtJBYYPV5JxFROo vfeddrSACg3IZ3
> BqczBImC8UCVmik3YFHvDeQ=
> =Y9zs
> -----END PGP SIGNATURE-----
>


[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org


--
Bruce Momjian http://candle.pha.pa.us
SRA OSS, Inc. http://www.sraoss.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 04-18-2008, 12:24 AM
Greg Sabino Mullane
 
Posts: n/a
Default Re: New pg_dump options: exclude tables/schemas, multiple


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


> Are we any closer to something to apply for this?


If by closer you mean closer to the top of my todo queue,
then yes. Otherwise, no time for it yet.

Boy, Tom issues an August 1st deadline and people are already
cracking down. Just kidding. *Hopefully* finished this weekend.
I'll even do some work on it tonight...

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200603021936
http://biglumber.com/x/web?pk=2529DF...9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFEB4+fvJuQZxSWSsgRAtaCAJ9Nccf3uQ+qNf5aQdJ9gu d0wDm96QCbBZIQ
D5YxaKxmEQMS3paPxH1Ncv4=
=P5xi
-----END PGP SIGNATURE-----



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-18-2008, 12:43 AM
Bruce Momjian
 
Posts: n/a
Default Re: New pg_dump options: exclude tables/schemas, multiple


This patch needs the modifications suggested in later emails,
specifically using regex and quering the server for matching objects.

URL added to TODO.

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

Greg Sabino Mullane wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
>
>
> Attached is a patch to hopefully make pg_dump a lot more useful.
> I started out by making it simply able to avoid dumping a single
> table, but, inspired by David Fetter's patch last November, also
> added in support for multiple items and limited wildcard matching.
>
> -n and -N control the schemas, and -t and -T control the tables.
>
> Wildcards can be a star at the start, the end, or on both sides
> of a term. The patch acts inclusively with conflicts: the -t
> option trumps the -N option.
>
> Some examples:
>
> To dump all tables beginning with the string "slony", plus
> all tables with the word "log" inside of them:
>
> pg_dump -t "slony*" -t "*log*"
>
> To dump all schemas except "dev" and "qa", and all tables
> except those ending in "large":
>
> pg_dump -N "dev" -N "qa" -T "*large"
>
> --
> Greg Sabino Mullane greg@turnstep.com
> PGP Key: 0x14964AC8 200601152100
> http://biglumber.com/x/web?pk=2529DF...9B906714964AC8
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFDyv9NvJuQZxSWSsgRAup9AKD110JJtJBYYPV5JxFROo vfeddrSACg3IZ3
> BqczBImC8UCVmik3YFHvDeQ=
> =Y9zs
> -----END PGP SIGNATURE-----
>


[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org


--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com