Re: Wildcard usage enhancements in .pgpass
От | Alexey Klyukin |
---|---|
Тема | Re: Wildcard usage enhancements in .pgpass |
Дата | |
Msg-id | CAAS3tyKCzZm6iifFUWYOM-79QzRgRnCm8XVkQ20U6sPwLWridA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Wildcard usage enhancements in .pgpass (Martijn van Oosterhout <kleptog@svana.org>) |
Ответы |
Re: Wildcard usage enhancements in .pgpass
|
Список | pgsql-hackers |
Hi Martijn,
On Sat, Nov 16, 2013 at 09:26:33PM +0100, Alexey Klyukin wrote:Looks interesting, though I wonder if you could use fnmatch(3) here. Or
> Hi,
>
> Attached is the patch that improves usage of '*' wildcard in .pgpass,
> particularly in the host part. The use case is below.
woud that match more than you expect? For example, it would allow
'foo*bar' to match 'foo.bar' which your code doesn't.
fnmatch(3) looks like a good deal and I'd certainly consider it if we go the road of matching regular expressions, although for simpler use cases it's an overkill, since it forces us to do an extra pass over the string to be matched and introduces some performance penalties of using a regexp matching engine.
Regards,
Alexey Klyukin
В списке pgsql-hackers по дате отправления: