Multicorn based PostgreSQL Foreign Data Wrapper for RethinkDB
This was set up for Python 2.7, Multicorn 1.1, PostgreSQL 9.3, and RethinkDB 1.15. If you are using something else, your mileage may vary. ... Heck, your mileage may vary anyhow. We think this works for us, we make no guarantee or promise it will work for you too ...
create foreign table mytable ( id uuid, somekey varchar, someotherkey varchar, sometimestamp timestamp (6) with time zone, bigintegerkey bigint, nestedjsonkey json, yetanotherkey varchar ) server myrethinkdb options (table_name 'rethinkdb_table');
When foreign table performance is an issue, you may want to put a materialized view in front of your foreign table. ** Remember to refresh the materialized view when you need to see the latest stuff from your RethinkDB. (PostgreSQL does not yet have auto-refreshing materialized views.)
log_min_messages = debug1
in your postgresql.conf to see the log_to_postgres() DEBUG messages.Here is a noteworthy blog post on the RethinkDB site about this project: http://rethinkdb.com/blog/postgres-foreign-data-wrapper/