CREATE SERVER mongodb_proxy_server FOREIGN DATA WRAPPER multicorn OPTIONS (wrapper 'mongoose_fdw.Mongoose_fdw');
CREATE FOREIGN TABLE test ( "_id" varchar OPTIONS (type 'ObjectId'), a numeric, d varchar )
SERVER mongodb_proxy_server OPTIONS ( db 'mongo-fdw', collection 'test', host 'localhost', port '27017', user 'mongo-fdw', password 'mongo-fdw' );
It is also there in postgres log
2016-06-08 09:31:04 WIB [13310-2] postgres@postgres STATEMENT: CREATE create SERVER mongodb_proxy_server FOREIGN DATA WRAPPER multicorn OPTIONS (wrapper 'mongoose_fdw.Mongoose_fdw');
And here is describe table result
Foreign table "public.test"
Column | Type | Modifiers | FDW Options
--------+-------------------+-----------+-------------------
_id | character varying | | (type 'ObjectId')
a | numeric | |
d | character varying | |
Server: mongodb_proxy_server
FDW Options: ("user" 'mongo-fdw', password 'mongo-fdw')
But when I do simple select, nothing is coming
postgres-# select * from test
postgres-#
Meanwhile the data is there
> use mongo-fdw
switched to db mongo-fdw
> db.test.find()
{ "_id" : ObjectId("57578255fc2e0738bc1e8e0f"), "a" : 1 }
>
Does the latest code really work? Any idea what is wrong?
I created server & foreign table as per below:
It is also there in postgres log
But when I do simple select, nothing is coming
Meanwhile the data is there
Does the latest code really work? Any idea what is wrong?