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

From Bruno Wolff III
Subject Re: pg_dump exclusion switches and functions/types
Date
Msg-id 20061006211734.GA21490@wolff.to
Whole thread Raw
In response to Re: pg_dump exclusion switches and functions/types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Oct 06, 2006 at 11:54:51 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> 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?

How about making the regex's anchored by default? People who want unanchored
ones can add .* at the beginning and/or end. Since only whether or not
the pattern matches is important (not the string it matched), this keeps
all of the same power, but matches the old behavior in simple cases.


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: 8.2 translation status?
Next
From: Tom Lane
Date:
Subject: Re: array_accum aggregate