Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Postgres/src/test/regress/sql/   (Postgres Database Version 18.4©)  Datei vom 11.4.2026 mit Größe 2 kB image not shown  

Quelle  xmlmap.sql

  Sprache: SQL
 

CREATE SCHEMA testxmlschema;

CREATE TABLE testxmlschema.test1 (a int, b text);
INSERT INTO testxmlschema.test1 VALUES (1'one'), (2'two'), (-1null);
CREATE DOMAIN testxmldomain AS varchar;
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);
ALTER TABLE testxmlschema.test2 DROP COLUMN aaa;
INSERT INTO testxmlschema.test2 VALUES (55'abc''def',
    98.629990,
    '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');

SELECT table_to_xml('testxmlschema.test1'falsefalse'');
SELECT table_to_xml('testxmlschema.test1'truefalse'foo');
SELECT table_to_xml('testxmlschema.test1'falsetrue'');
SELECT table_to_xml('testxmlschema.test1'truetrue'');
SELECT table_to_xml('testxmlschema.test2'falsefalse'');

SELECT table_to_xmlschema('testxmlschema.test1'falsefalse'');
SELECT table_to_xmlschema('testxmlschema.test1'truefalse'');
SELECT table_to_xmlschema('testxmlschema.test1'falsetrue'foo');
SELECT table_to_xmlschema('testxmlschema.test1'truetrue'');
SELECT table_to_xmlschema('testxmlschema.test2'falsefalse'');

SELECT table_to_xml_and_xmlschema('testxmlschema.test1'falsefalse'');
SELECT table_to_xml_and_xmlschema('testxmlschema.test1'truefalse'');
SELECT table_to_xml_and_xmlschema('testxmlschema.test1'falsetrue'');
SELECT table_to_xml_and_xmlschema('testxmlschema.test1'truetrue'foo');

SELECT query_to_xml('SELECT * FROM testxmlschema.test1'falsefalse'');
SELECT query_to_xmlschema('SELECT * FROM testxmlschema.test1'falsefalse'');
SELECT query_to_xml_and_xmlschema('SELECT * FROM testxmlschema.test1'truetrue'');

DECLARE xc CURSOR WITH HOLD FOR SELECT * FROM testxmlschema.test1 ORDER BY 12;
SELECT cursor_to_xml('xc'::refcursor, 5falsetrue'');
SELECT cursor_to_xmlschema('xc'::refcursor, falsetrue'');
MOVE BACKWARD ALL IN xc;
SELECT cursor_to_xml('xc'::refcursor, 5truefalse'');
SELECT cursor_to_xmlschema('xc'::refcursor, truefalse'');

SELECT schema_to_xml('testxmlschema'falsetrue'');
SELECT schema_to_xml('testxmlschema'truefalse'');
SELECT schema_to_xmlschema('testxmlschema'falsetrue'');
SELECT schema_to_xmlschema('testxmlschema'truefalse'');
SELECT schema_to_xml_and_xmlschema('testxmlschema'truetrue'foo');


-- 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;
SELECT table_to_xml('testxmlschema.test3'truetrue'');

Messung V0.5 in Prozent
C=83 H=96 G=89

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-08-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.