2009-07-02 09:03:18 +02:00
|
|
|
CREATE SCHEMA testxmlschema;
|
|
|
|
CREATE TABLE testxmlschema.test1 (a int, b text);
|
|
|
|
INSERT INTO testxmlschema.test1 VALUES (1, 'one'), (2, 'two'), (-1, null);
|
|
|
|
CREATE DOMAIN testxmldomain AS varchar;
|
2022-03-18 21:01:42 +01:00
|
|
|
CREATE TABLE testxmlschema.test2 (z int, y varchar(500), x char(6),
|
|
|
|
w numeric(9,2), v smallint, u bigint, t real,
|
|
|
|
s time, stz timetz, r timestamp, rtz timestamptz, q date,
|
|
|
|
p xml, o testxmldomain, n bool, m bytea, aaa text);
|
2009-07-02 09:03:18 +02:00
|
|
|
ALTER TABLE testxmlschema.test2 DROP COLUMN aaa;
|
2022-03-18 21:01:42 +01:00
|
|
|
INSERT INTO testxmlschema.test2 VALUES (55, 'abc', 'def',
|
|
|
|
98.6, 2, 999, 0,
|
|
|
|
'21:07', '21:11 +05', '2009-06-08 21:07:30', '2009-06-08 21:07:30 -07', '2009-06-08',
|
|
|
|
NULL, 'ABC', true, 'XYZ');
|
2009-07-02 09:03:18 +02:00
|
|
|
SELECT table_to_xml('testxmlschema.test1', false, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xml('testxmlschema.test1', true, false, 'foo');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xml('testxmlschema.test1', false, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xml('testxmlschema.test1', true, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xml('testxmlschema.test2', false, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xmlschema('testxmlschema.test1', false, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xmlschema('testxmlschema.test1', true, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xmlschema('testxmlschema.test1', false, true, 'foo');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xmlschema('testxmlschema.test1', true, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xmlschema('testxmlschema.test2', false, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xml_and_xmlschema('testxmlschema.test1', false, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xml_and_xmlschema('testxmlschema.test1', true, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xml_and_xmlschema('testxmlschema.test1', false, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xml_and_xmlschema('testxmlschema.test1', true, true, 'foo');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT query_to_xml('SELECT * FROM testxmlschema.test1', false, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT query_to_xmlschema('SELECT * FROM testxmlschema.test1', false, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT query_to_xml_and_xmlschema('SELECT * FROM testxmlschema.test1', true, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
DECLARE xc CURSOR WITH HOLD FOR SELECT * FROM testxmlschema.test1 ORDER BY 1, 2;
|
|
|
|
SELECT cursor_to_xml('xc'::refcursor, 5, false, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
2017-05-04 03:25:01 +02:00
|
|
|
SELECT cursor_to_xmlschema('xc'::refcursor, false, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
MOVE BACKWARD ALL IN xc;
|
2009-07-02 09:03:18 +02:00
|
|
|
SELECT cursor_to_xml('xc'::refcursor, 5, true, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT cursor_to_xmlschema('xc'::refcursor, true, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT schema_to_xml('testxmlschema', false, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT schema_to_xml('testxmlschema', true, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT schema_to_xmlschema('testxmlschema', false, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT schema_to_xmlschema('testxmlschema', true, false, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT schema_to_xml_and_xmlschema('testxmlschema', true, true, 'foo');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
2013-03-14 03:42:57 +01:00
|
|
|
-- test that domains are transformed like their base types
|
|
|
|
CREATE DOMAIN testboolxmldomain AS bool;
|
|
|
|
CREATE DOMAIN testdatexmldomain AS date;
|
|
|
|
CREATE TABLE testxmlschema.test3
|
|
|
|
AS SELECT true c1,
|
|
|
|
true::testboolxmldomain c2,
|
|
|
|
'2013-02-21'::date c3,
|
|
|
|
'2013-02-21'::testdatexmldomain c4;
|
|
|
|
SELECT xmlforest(c1, c2, c3, c4) FROM testxmlschema.test3;
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|
|
|
|
SELECT table_to_xml('testxmlschema.test3', true, true, '');
|
|
|
|
ERROR: unsupported XML feature
|
|
|
|
DETAIL: This functionality requires the server to be built with libxml support.
|