pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

Parse error with double dashes/hyphens in hostname

Open brantb opened this issue 3 months ago • 0 comments

Steps to reproduce

Run the following command:

$ pgloader "mysql://[email protected]/foo" "postgresql://[email protected]"

Expected result

pgloader recognizes the second argument as a PostgreSQL database URI and proceeds.

Actual result:

2025-09-25T12:05:57.003783-04:00 LOG pgloader version "3.6.9"
2025-09-25T12:05:57.005166-04:00 ERROR Could not parse target string "postgresql://[email protected]": At

  postgresql://[email protected]
                            ^ (Line 1, Column 26, Position 26)

In context NETWORK-LABEL-LETTERS-DIGIT:

While parsing NETWORK-LABEL-LETTERS-DIGIT. Problem:

  The production

    #\-

  does not satisfy the predicate ALPHA-CHAR-P.

Expected:

     any character satisfying DIGIT-CHAR-P
  or any character satisfying ALPHA-CHAR-P
2025-09-25T12:05:57.005192-04:00 FATAL Failed to parse "postgresql://[email protected]" as a PostgreSQL database URI.

Environment

pgloader v3.6.9 (Homebrew) macOS Tahoe 26.0

brantb avatar Sep 25 '25 16:09 brantb