mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Implement ipv6 hostname support in .pgpass rules.
An hostname could be written [::1] in .pgass, without having to escape the colon characters, and with a proper enclosing in square brackets, as common for ipv6 addresses. Fixes #837.
This commit is contained in:
parent
656bf85075
commit
a6ef7a56a9
@ -14,8 +14,14 @@
|
||||
(defrule pgpass-escaped-char (and #\\ (or #\\ #\:))
|
||||
(:lambda (c) (second c)))
|
||||
|
||||
(defrule pgpass-ipv6-hostname (and #\[
|
||||
(+ (or (digit-char-p character) ":"))
|
||||
#\])
|
||||
(:lambda (ipv6) (text (second ipv6))))
|
||||
|
||||
(defrule pgpass-entry (or "*"
|
||||
(+ (or pgpass-escaped-char
|
||||
(+ (or pgpass-ipv6-hostname
|
||||
pgpass-escaped-char
|
||||
(pgpass-char-p character))))
|
||||
(:lambda (e) (text e)))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user