[ ] 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…
[x] did you search for other similar issues?
[x] 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
;
[x] 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
[x] pgloader --version
[ ] 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…
[x] did you search for other similar issues?
[x] how can I reproduce the bug? have a DB with a host that contains underscores for example "test_pgsql"
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 dotest\_mysql
"test_mysql"
test\\_mysql