EnterpriseDB / mysql_fdw

PostgreSQL foreign data wrapper for MySQL
Other
531 stars 162 forks source link

IMPORT FOREIGN SCHEMA doesn't seem to support the LIMIT TO/EXCLUDE syntax for limiting imported tables #83

Closed InfoSec812 closed 8 years ago

InfoSec812 commented 8 years ago

While working on using the recently added IMPORT FOREIGN SCHEMA functionality in PostgreSQL 9.5, I tried to do the following:

IMPORT FOREIGN SCHEMA mydb LIMIT TO (customer, cluster, datastore, ...) FROM SERVER mysql INTO imported;

And got a result saying that the where clause generated for the MySQL server was wrong:

ERROR:  failed to execute the MySQL query: 
Unknown column 'customer' in 'where clause'

I haven't yet looked at the code to track this down, but hopefully sometime this weekend I will prepare a pull request to resolve this error.

ahsanhadi commented 8 years ago

On Sat, Jan 9, 2016 at 10:32 AM, Deven Phillips notifications@github.com wrote:

While working on using the recently added IMPORT FOREIGN SCHEMA functionality in PostgreSQL 9.5, I tried to do the following:

IMPORT FOREIGN SCHEMA mydb LIMIT TO (customer, cluster, datastore, ...) FROM SERVER mysql INTO imported;

And got a result saying that the where clause generated for the MySQL server was wrong:

ERROR: failed to execute the MySQL query: Unknown column 'customer' in 'where clause'

I haven't yet looked at the code to track this down, but hopefully sometime this weekend I will prepare a pull request to resolve this error.

Thanks...I see the pull request from you. We will review and test it on our end and get it merged this week...

— Reply to this email directly or view it on GitHub https://github.com/EnterpriseDB/mysql_fdw/issues/83.

Ahsan Hadi Snr Director Product Development EnterpriseDB Corporation The Enterprise Postgres Company

Phone: +92-51-8358874 Mobile: +92-333-5162114

Website: www.enterprisedb.com EnterpriseDB Blog: http://blogs.enterprisedb.com/ Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.

InfoSec812 commented 8 years ago

Works for me and with my database schema in MySQL. Thanks for the merge!