Re: pg_dump exclusion switches and functions/types

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kris Jurka <books(at)ejurka(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump exclusion switches and functions/types
Date: 2006-10-06 16:26:10
Message-ID: 452683A2.40208@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-10-06 17:22:25 Re: pg_dump exclusion switches and functions/types
Previous Message Csaba Nagy 2006-10-06 16:18:44 Re: pg_dump exclusion switches and functions/types