Skip to content

Parse error with double dashes/hyphens in hostname #1685

@brantb

Description

@brantb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions