Re: [GENERAL] query_to_xml nulls set to false

2011-07-29 Thread Peter Eisentraut
On mån, 2011-07-11 at 18:54 -0700, Lynn Dobbs wrote:
 I am using query_to_xml with nulls set to false in postgresql 9.0.4.
 (I believe the behavior was also present in 8.4.)
 
 The documentation for query_to_xml says that if set to true, nulls
 with be treated with xsi:nil=true and An appropriate namespace
 declaration will be added to the result value. If false, columns
 containing null values are simply omitted from the output.
 
 This suggests to me that if set to false, there should be no added
 namespace declaration, but, in practice, the xsi namespace is present.
 
 Is this the designed, intentional behavior or accidental?

The xsi namespace is always added, but this is an implementation detail,
it's not something that has to be one way or another.  The XML is
equivalent, after all.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] query_to_xml nulls set to false

2011-07-11 Thread Lynn Dobbs
I am using query_to_xml with nulls set to false in postgresql 9.0.4.  (I
believe the behavior was also present in 8.4.)

The documentation for query_to_xml says that if set to true, nulls with
be treated with xsi:nil=true and An appropriate namespace declaration
will be added to the result value. If false, columns containing null
values are simply omitted from the output.

This suggests to me that if set to false, there should be no added
namespace declaration, but, in practice, the xsi namespace is present.

Is this the designed, intentional behavior or accidental?

Lynn Dobbs

Chief Technical Officer
CreditLink Corporation
858 496 1010 x 103