File: multicorn_error_test.sql

package info (click to toggle)
postgresql-multicorn 1.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,244 kB
  • sloc: ansic: 3,324; python: 2,258; sql: 751; makefile: 259; sh: 81
file content (21 lines) | stat: -rw-r--r-- 728 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SET client_min_messages=NOTICE;
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'
);

ALTER server multicorn_srv options (DROP wrapper);

CREATE server multicorn_empty_srv foreign data wrapper multicorn;

DROP EXTENSION multicorn cascade;