1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
SET client_min_messages=NOTICE;
CREATE EXTENSION multicorn;
CREATE EXTENSION hstore;
CREATE server multicorn_srv foreign data wrapper multicorn options (
wrapper 'multicorn.testfdw.TestForeignDataWrapper'
);
CREATE user mapping FOR current_user server multicorn_srv options (usermapping 'test');
CREATE foreign table testmulticorn (
test1 hstore,
test2 hstore
) server multicorn_srv options (
option1 'option1',
test_type 'dict'
);
-- Test "normal" usage
select * from testmulticorn;
select test1 -> 'repeater' as r from testmulticorn order by r;
DROP USER MAPPING FOR current_user SERVER multicorn_srv;
DROP EXTENSION multicorn cascade;
|