Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Escaping table names #34
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.
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.
added a commit
Oct 24, 2017
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: