Re: New pg_dump options: exclude tables/schemas, multiple all, wildcards - Mailing list pgsql-patches

From Greg Sabino Mullane
Subject Re: New pg_dump options: exclude tables/schemas, multiple all, wildcards
Date
Msg-id 7d8398553bf8cd745a2923ed6dfb5c95@biglumber.com
Whole thread Raw
In response to Re: New pg_dump options: exclude tables/schemas, multiple all, wildcards  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: New pg_dump options: exclude tables/schemas, multiple all, wildcards
List pgsql-patches
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> In practice, I don't think that LIKE-style patterns (% and _ wildcards)
> will pose a serious compatibility problem if we just decree that the
> -n and -t switches now take patterns rather than plain names.  I agree
> that regex-style patterns would open some gotchas, but what's wrong with
> standardizing on LIKE patterns?

Sounds good, but the more I think about it, why don't we just use regexes via
the ~ operator? After all, if we want to exclude schemas starting with an
underscore from pg_dump, then -N '^_.*' is no worse than -N '\\_%' and has
the added advantage of being more like regexes people are used to. I guess
my earlier 'which is which' argument isn't too much to worry about either -
chances are very slim that an existing script is using a -t argument that
contains regular expressions. Plus, while the underscore is common in
namespace names, a period is not.

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

iD8DBQFDzZSpvJuQZxSWSsgRAiEQAKD5YXJjne5ZjbSUyHLiVKrEBtLPxQCfbsN8
JlQH5S+UVTogKpyRQJoU6jk=
=Sfcu
-----END PGP SIGNATURE-----



pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: New pg_dump options: exclude tables/schemas, multiple all, wildcards
Next
From: Tom Lane
Date:
Subject: Re: New pg_dump options: exclude tables/schemas, multiple all, wildcards