- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- ソース を表示
- PostgreSQL/mongo_fdw へ行く。
- 1 (2017-05-07 (日) 22:21:23)
- 2 (2017-05-07 (日) 22:43:45)
- 3 (2017-05-08 (月) 19:23:17)
- 4 (2017-05-13 (土) 01:13:29)
- 5 (2017-06-03 (土) 01:01:10)
mongo_fdw †
- EnterpriseDB社から提供されているオープンソースソフトウェア。
- PostgreSQLのForeign Data Wrapperを使って,PostgreSQLからMongoDBのデータに透過的にアクセスすることができる。
- 外部テーブルに対して,INSERTやUPDATE,DELETEなどのDMLを通じて,MongoDBに対して更新や削除も行なうことができる。
設定・使用方法 †
PostgreSQL側の準備 †
外部テーブルを作成する。
$ brew link openssl --force Warning: Refusing to link: openssl Linking keg-only openssl means you may end up linking against the insecure, deprecated system OpenSSL while using the headers from Homebrew's openssl. Instead, pass the full include/library paths to your compiler e.g.: -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
MongoDB側の準備 †
- アクセスユーザーを登録し,コレクションにドキュメントを作成する。
- 以下の例では,R/W権限とAdmin権限をロールに設定している。
### # Configure and install the Mongo C Driver and libbson # function install_mongoc_driver { cd mongo-c-driver ./configure --with-libbson=auto --enable-ssl CFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" # ここに追加 make install cd .. }