diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 34 | ||||
-rw-r--r-- | doc/src/sgml/datatype.sgml | 20 |
2 files changed, 52 insertions, 2 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 94fc8fd79aa..2a95d8fae73 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.105 2007/01/25 04:35:10 momjian Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.106 2007/01/25 11:53:50 petere Exp $ --> <chapter Id="runtime-config"> <title>Server Configuration</title> @@ -3558,6 +3558,38 @@ SELECT * FROM parent WHERE key = 2400; </listitem> </varlistentry> + <varlistentry id="guc-xmloption" xreflabel="xmloption"> + <term><varname>xmloption</varname> (<type>string</type>)</term> + <indexterm> + <primary><varname>xmloption</> configuration parameter</primary> + </indexterm> + <indexterm> + <primary><varname>SET XML OPTION</></primary> + </indexterm> + <indexterm> + <primary><varname>XML option</></primary> + </indexterm> + <listitem> + <para> + Sets whether <literal>DOCUMENT</literal> or + <literal>CONTENT</literal> is implicit when converting between + XML and character string values. See <xref + linkend="datatype-xml"> for a description of this. Valid + values are <literal>DOCUMENT</literal> and + <literal>CONTENT</literal>. The default is + <literal>CONTENT</literal>. + </para> + + <para> + According to the SQL standard, the command to set this option is +<synopsis> +SET XML OPTION { DOCUMENT | CONTENT }; +</synopsis> + This syntax is also available in PostgreSQL. + </para> + </listitem> + </varlistentry> + </variablelist> </sect2> <sect2 id="runtime-config-client-format"> diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 47c2e5c74af..f0ba6c32c71 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.185 2007/01/18 13:59:11 petere Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.186 2007/01/25 11:53:50 petere Exp $ --> <chapter id="datatype"> <title id="datatype-title">Data Types</title> @@ -3475,6 +3475,24 @@ XMLSERIALIZE ( { DOCUMENT | CONTENT } <replaceable>value</replaceable> AS <repla </para> <para> + When character string values are cast to or from type + <type>xml</type> without going through <type>XMLPARSE</type> or + <type>XMLSERIALIZE</type>, respectively, the choice of + <literal>DOCUMENT</literal> versus <literal>CONTENT</literal> is + determined by the <quote>XML option</quote> session configuration + parameter, which can be set using the standard command +<synopsis> +SET XML OPTION { DOCUMENT | CONTENT }; +</synopsis> + or the more PostgreSQL-like syntax +<synopsis> +SET xmloption TO { DOCUMENT | CONTENT }; +</synopsis> + The default is <literal>CONTENT</literal>, so all forms of XML + data are allowed. + </para> + + <para> Care must be taken when dealing with multiple character encodings on the client, server, and in the XML data passed through them. When using the text mode to pass queries to the server and query |