mysql_fdw icon indicating copy to clipboard operation
mysql_fdw copied to clipboard

Make IMPORT FOREIGN SCHEMA behave consistently with mixed-case table names

Open mhw opened this issue 5 years ago • 2 comments

The case of the table names returned by information_schema queries depends on MySQL's lower_case_table_names setting: on systems where the value is non-zero the table name will be forced to lowercase. Importing tables with mixed-case names requires different SQL depending on the MySQL server's settings as explained in #202.

This PR fixes the issue by forcing a suitable collation so that the information_schema query is case insensitive when matching table names and preserves case in the results.

Fixes #202.

mhw avatar Sep 09 '20 16:09 mhw

This is very usefully PR. Some years ago there were the same problems in firebird_fdw and sqlite_fdw.

mkgrgis avatar Feb 10 '23 05:02 mkgrgis

@jeevanchalke, what about this IMPORT FOREIGN SCHEMA ISO SQL behaviour? Tests are also added.

mkgrgis avatar Feb 15 '23 15:02 mkgrgis