-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Escaping table names #34
Comments
hi, can you provide me a table create statement I can test? |
Sure, there is example:
Keywords in MySQL should be escaped by `... but in pgSQL by double quote :) I cannot achieve it by config file. It is not bad idea to always escape table and column names. In pgSQL it also results in case sensitivity - I suspect you are doing this because the column names are written with a distinction between uppercase and lowercase. Perhaps you only need to escape names of columns and tables in MySQL to solve this. |
the fix will appear in the version 1.8.1 (probably released this sunday). |
the version 2.0 is not affected by the bug |
There is another place where you have to do it.
Table name is not escaped :) pg_chameleon/pg_chameleon/lib/mysql_lib.py at line 723 After fixing that init_replica doesn't copy data:
|
let me have a look ;) |
I've added an test record and the data is copied correctly on postgres |
It works. Thank you. I have not tried replication yet. |
The table names are escaped when replayed so probably it should work fine. I'm waiting for your feedback before closing the issue though. |
Any update on this issue? If the replica works I'd close the ticket. Thanks |
I would like to synchronize tables with reserved keyword as names - for example "order", "user". Escaping it in config file by '`' didn't work. I don't know nothing about creating and synchronizing it in pgSQL cause I didn't pass init_replica. I would appreciate your help, as I would like to use this solution in the near future in a fairly large e-commerce system production.
The text was updated successfully, but these errors were encountered: