connect mysql to postgresql

我与影子孤独终老i 提交于 2020-01-05 05:51:06

问题


i'm working with a drupal installation, that uses mysql to create a new user, that has to put his email to be created (its type in mysql is varchar(64)), and then goes to the actual webpage, that works with postgresql, and the user has to put his email another time and then save. Actually the new user table is created in postgres as soon as he puts the email (primary key).

what i would like is a function, or something that as soon as the new user is created in mysql, it automatically connects to postgres to save the email there. Is it possible? How can i do that?


回答1:


You might want to consider a "foreign data wrapper" (FDW).

http://wiki.postgresql.org/wiki/Foreign_data_wrappers#mysql_fdw

http://www.postgresql.org/docs/9.1/static/sql-createforeigndatawrapper.html



来源:https://stackoverflow.com/questions/10317229/connect-mysql-to-postgresql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!