Re: pg_dump exclusion switches and functions/types

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: pg_dump exclusion switches and functions/types
Дата
Msg-id 20061006211734.GA21490@wolff.to
обсуждение исходный текст
Ответ на Re: pg_dump exclusion switches and functions/types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: 8.2 translation status?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: array_accum aggregate