Re: pg_dump exclusion switches and functions/types - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: pg_dump exclusion switches and functions/types
Date
Msg-id 452683A2.40208@dunslane.net
Whole thread Raw
In response to Re: pg_dump exclusion switches and functions/types  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_dump exclusion switches and functions/types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Lastly, as long as we're questioning the premises of this patch,
> I wonder about the choice to use regex pattern matching rules.
> The problem with regex is that to be upward-compatible with the old
> exact-match switch definitions, a switch value that doesn't contain
> any regex special characters is treated as an equality condition not
> a pattern, which makes for a discontinuity.  For instance, "-t x" is
> treated like -t '^x$' while -t 'x.*y' doesn't get the anchors added.
> That's going to burn people.  An alternative we could consider is to
> use LIKE patterns instead, but since underscore is a wildcard in LIKE,
> it's easy to imagine people getting burnt by that too.  Or we could
> import the rather ad-hoc shell-wildcard-like rules used by psql's \d
> stuff.  None of these are especially attractive :-(
>
> Comments?
>
>     


1. regexes, please.
2. I'd rather remove backwards compatibility than have the 
discontinuity. After all, users can anchor the expression pretty easily. 
If not, then let's use an alternate switch for the regexes, (I know we 
are running out of option space).

cheers

andrew


pgsql-hackers by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: pg_dump exclusion switches and functions/types
Next
From: Tom Lane
Date:
Subject: Re: pg_dump exclusion switches and functions/types