Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ronan Dunklau
committed
Oct 5, 2012
1 parent
d759365
commit 265df73
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE EXTENSION multicorn; | ||
-- Test that the wrapper option is required on the server. | ||
CREATE server multicorn_srv foreign data wrapper multicorn; | ||
ERROR: The wrapper parameter is mandatory, specify a valid class name | ||
-- Test that the wrapper option cannot be altered on the table | ||
CREATE server multicorn_srv foreign data wrapper multicorn options ( | ||
wrapper 'multicorn.testfdw.TestForeignDataWrapper' | ||
); | ||
CREATE foreign table testmulticorn ( | ||
test1 character varying, | ||
test2 character varying | ||
) server multicorn_srv options ( | ||
option1 'option1', | ||
wrapper 'multicorn.evilwrapper.EvilDataWrapper' | ||
); | ||
ERROR: Cannot set the wrapper class on the table | ||
HINT: Set it on the server | ||
DROP EXTENSION multicorn cascade; | ||
NOTICE: drop cascades to server multicorn_srv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CREATE EXTENSION multicorn; | ||
-- Test that the wrapper option is required on the server. | ||
CREATE server multicorn_srv foreign data wrapper multicorn; | ||
-- Test that the wrapper option cannot be altered on the table | ||
CREATE server multicorn_srv foreign data wrapper multicorn options ( | ||
wrapper 'multicorn.testfdw.TestForeignDataWrapper' | ||
); | ||
CREATE foreign table testmulticorn ( | ||
test1 character varying, | ||
test2 character varying | ||
) server multicorn_srv options ( | ||
option1 'option1', | ||
wrapper 'multicorn.evilwrapper.EvilDataWrapper' | ||
); | ||
DROP EXTENSION multicorn cascade; |