Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underscore in host does not work / how to escape underscore in host name #1579

Open
4 of 7 tasks
Anubarak opened this issue Apr 22, 2024 · 0 comments
Open
4 of 7 tasks

Comments

@Anubarak
Copy link

Anubarak commented Apr 22, 2024

  • pgloader --version

    pgloader version "3.6.9"
    compiled with SBCL 2.3.4
    
  • did you test a fresh compile from the source tree?

    Compiling pgloader from sources is documented in the
    README, it's
    easy to do, and if patches are to be made to fix your bug, you're going
    to have to build from sources to get the fix anyway…

  • did you search for other similar issues?

  • how can I reproduce the bug?
    have a DB with a host that contains underscores for example "test_pgsql"

--
-- EDIT THIS FILE TO MATCH YOUR BUG REPORT
--
LOAD DATABASE
     FROM      mysql://myuser:pA>q2qz+6q3%[%6]@test_mysql:3306/my_table
     INTO postgresql://myuser:pA>q2qz+6q3%[%6]@test_pgsql:5432/my_table
;
  • pgloader output you obtain
2024-04-22T14:09:09.030000Z LOG pgloader version "3.6.9"
2024-04-22T14:09:09.050000Z LOG Parsing commands from file #P"/app/my.load"
KABOOM!
ESRAP-PARSE-ERROR: At

  LOAD DATABASE
       FROM      mysql://myuser:pA>q2qz+6q3%[%6]@test_mysql:3306/my_table
  
                                                     ^ (Line 2, Column 51, Position 65)

In context MYSQL-URI:

While parsing DSN-DBNAME. Expected:

     the character / (SOLIDUS)

While parsing DSN-PORT. Expected:

     the character : (COLON)

While parsing NETWORK-HOSTNAME. Problem:

  The production
  
    #\_
  
  does not satisfy the predicate ALPHA-CHAR-P.

Expected:

     the character - (HYPHEN-MINUS)
  or the character . (FULL_STOP)
  or any character satisfying DIGIT-CHAR-P
  or any character satisfying ALPHA-CHAR-P
An unhandled error condition has been signalled: At

  LOAD DATABASE
       FROM      mysql://myuser:pA>q2qz+6q3%[%6]@test_mysql:3306/my_table
  
                                                     ^ (Line 2, Column 51, Position 65)

In context MYSQL-URI:

While parsing DSN-DBNAME. Expected:

     the character / (SOLIDUS)

While parsing DSN-PORT. Expected:

     the character : (COLON)

While parsing NETWORK-HOSTNAME. Problem:

  The production
  
    #\_
  
  does not satisfy the predicate ALPHA-CHAR-P.

Expected:

     the character - (HYPHEN-MINUS)
  or the character . (FULL_STOP)
  or any character satisfying DIGIT-CHAR-P
  or any character satisfying ALPHA-CHAR-P




What I am doing here?

At

  LOAD DATABASE
       FROM      mysql://myuser:pA>q2qz+6q3%[%6]@test_mysql:3306/my_table
  
                                                     ^ (Line 2, Column 51, Position 65)

In context MYSQL-URI:

While parsing DSN-DBNAME. Expected:

     the character / (SOLIDUS)

While parsing DSN-PORT. Expected:

     the character : (COLON)

While parsing NETWORK-HOSTNAME. Problem:

  The production
  
    #\_
  
  does not satisfy the predicate ALPHA-CHAR-P.

Expected:

     the character - (HYPHEN-MINUS)
  or the character . (FULL_STOP)
  or any character satisfying DIGIT-CHAR-P
  or any character satisfying ALPHA-CHAR-P
  • data that is being loaded, if relevant
PASTE HERE THE DATA THAT HAS BEEN LOADED
Not relevant
  • How the data is different from what you expected, if relevant

actually I don't really understand your template so I'll just write my issue without it here again.

I have a db host name that contains underscores but I am not able to properly escape them, can you please tell me how to do that?
My host is for example test_mysql but I always receive an error no matter what I do

  • test\_mysql
  • "test_mysql"
  • test\\_mysql
@Anubarak Anubarak changed the title Underscore in host does not work Underscore in host does not work / how to escape underscore in host name Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant