Re: SQL/XML publishing function experimental patch II

From: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-08-23 09:12:18
Message-ID: e431ff4c0608230212t459b052du40f3f3e34c21427d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On 8/22/06, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> I am still waiting for some documentation on what XML support we have,
> and what we need. We can't decide on this patch until we have that.
>

Here is my thoughts:
http://nikolay.samokhvalov.com/2006/08/23/xml-and-relational/
(maybe too much words - sorry for it - but classification is very
simple and then I give some simple but important examples; if you them
too boring, read the two comments and the end).

As for that patch itself, I can say two things:
1. It's really useful but can be considered only as the first step
to XML type support; I personally would be very happy if it will be
included in 8.2 not by default, but with "--with-xml" configure option
(the patch changes the grammar... is it possible to provide the user
with capabilities to define during configuration process what parts of
gram.y will be turned on?)
2. It has some problems such as following:
a) "SELECT XMLELEMENT(NAME "A<!--111", 222);" produces invalid XML
(the substring "--" cannot be used in element names, and even as text
value of XML elements). In other words, patch uses ColCabel to define
XML element names, which is not correct (needs additional narrowing);
b) subqueries inside some constructions are not possible, e.g.:
"SELECT XMLCONCAT((SELECT XMLELEMENT(NAME aaa, 111)), XMLELEMENT(NAME
bbb, 222));" doesn't work (only straight list of xmlexpr can be
accepted). Another simple example of this issue is XMLCONCAT of NULLs
(NULL is valid XML value according to SQL/XML:200{3,6});
c) XMLPI should have "NAME" keyword before the first argument
(similar to XMLELEMENT), according to SQL/XML:2003.

Since I use this patch in my work on SoC's "initial support of XML
type" (I'll describe results and provide the code in the separate
messages later), I've improved some of issues as long as typos - such
as "<-- ... -->" instead of "<!-- ... -->" in XMLCOMMENT definition,
code style cleanup, etc. If you decide to include Pavel's patch to
8.2, I'll be glad to create the slightly improved version of his
patch.

I plan to continue discussing the theme of XML-enabled databases and
discuss abilities that Postgres has in this area.

Hope, this will help. Please, if you see that I am wrong somewhere -
let me know / let's discuss it.

--
Best regards,
Nikolay

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Karel Zak 2006-08-23 09:17:19 Leaving... (was: Re: [HACKERS] COPY view)
Previous Message Karel Zak 2006-08-23 08:35:09 Re: [HACKERS] COPY view