Re: SQL/XML publishing function experimental patch II

Lists: pgsql-patches
From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: SQL/XML publishing function experimental patch II
Date: 2005-09-28 14:30:54
Message-ID: BAY20-F207275A7B90C6655A7BE2EF98D0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Hello

base type changed to text, better registration xmlagg function

Regards
Pavel Stehule

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci.
http://messenger.msn.cz/

Attachment Content-Type Size
sqlxml.diff text/x-patch 45.8 KB

From: David Fetter <david(at)fetter(dot)org>
To: Pavel Stehule <pavel(dot)stehule(at)hotmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2005-09-29 08:59:35
Message-ID: 20050929085935.GA7534@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Wed, Sep 28, 2005 at 04:30:54PM +0200, Pavel Stehule wrote:
> Hello
>
> base type changed to text, better registration xmlagg function

Interesting. The SGML docs appear to be machine-generated stubs.
Could you point to a reference for them so they can be filled in?

Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!


From: David Fetter <david(at)fetter(dot)org>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2005-10-02 23:52:56
Message-ID: 20051002235256.GB4490@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Wed, Sep 28, 2005 at 04:30:54PM +0200, Pavel Stehule wrote:
> Hello
>
> base type changed to text, better registration xmlagg function
>
> Regards Pavel Stehule

Now with some slightly improved documentation, works vs. CVS tip as of
this writing.

Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

Attachment Content-Type Size
sqlxml.diff text/plain 47.9 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2005-10-13 20:50:09
Message-ID: 200510132050.j9DKoAv08653@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


This has been saved for the 8.2 release:

http://momjian.postgresql.org/cgi-bin/pgpatches_hold

---------------------------------------------------------------------------

David Fetter wrote:
> On Wed, Sep 28, 2005 at 04:30:54PM +0200, Pavel Stehule wrote:
> > Hello
> >
> > base type changed to text, better registration xmlagg function
> >
> > Regards Pavel Stehule
>
> Now with some slightly improved documentation, works vs. CVS tip as of
> this writing.
>
> Cheers,
> D
> --
> David Fetter david(at)fetter(dot)org http://fetter.org/
> phone: +1 510 893 6100 mobile: +1 415 235 3778
>
> Remember to vote!

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-06-14 19:45:51
Message-ID: 200606141945.k5EJjpk26566@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Do we want this XML patch in the backend? It needs syntax support so I
don't see how it could be done in /contrib. Attached.

---------------------------------------------------------------------------

David Fetter wrote:
> On Wed, Sep 28, 2005 at 04:30:54PM +0200, Pavel Stehule wrote:
> > Hello
> >
> > base type changed to text, better registration xmlagg function
> >
> > Regards Pavel Stehule
>
> Now with some slightly improved documentation, works vs. CVS tip as of
> this writing.
>
> Cheers,
> D
> --
> David Fetter david(at)fetter(dot)org http://fetter.org/
> phone: +1 510 893 6100 mobile: +1 415 235 3778
>
> Remember to vote!

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/rtmp/9 text/x-diff 47.9 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: David Fetter <david(at)fetter(dot)org>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-06-14 20:14:09
Message-ID: 3201.1150316049@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Do we want this XML patch in the backend? It needs syntax support so I
> don't see how it could be done in /contrib. Attached.

I think this could easily be done as an external module if it didn't
insist on random additions to the function-call syntax. AFAICS there
isn't anything there that couldn't be done without that.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-06-14 20:53:25
Message-ID: 200606142253.26755.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane wrote:
> I think this could easily be done as an external module if it didn't
> insist on random additions to the function-call syntax. AFAICS there
> isn't anything there that couldn't be done without that.

This is part of the SQL standard.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-06-14 20:57:42
Message-ID: 200606142057.k5EKvgX19416@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Peter Eisentraut wrote:
> Tom Lane wrote:
> > I think this could easily be done as an external module if it didn't
> > insist on random additions to the function-call syntax. AFAICS there
> > isn't anything there that couldn't be done without that.
>
> This is part of the SQL standard.

Ah, I suspected that might be true.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: 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-06-14 21:23:05
Message-ID: 3822.1150320185@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> This is part of the SQL standard.

[ shrug ] There is a *boatload* of new stuff in SQL2003, most of which
we probably won't ever implement. The foundation alone has enough new
cruft to keep us busy for years ... never mind stuff that shows up only
in Part 14.

Basically, SQL2003 is way too big for the argument "it's in the spec"
to be an automatic trump card for putting features into core PG.
We have to think about distribution size and maintainability versus
the usefulness of specific features.

If there were a serious amount of demand for the SQL2003 XML features
then I wouldn't be averse to putting them in, but right now it looks
like bloat with little redeeming social value. Who other than the
submitter has asked for this? I don't even see "XML" listed in TODO.

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-06-14 21:27:43
Message-ID: 200606142127.k5ELRhg25353@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > This is part of the SQL standard.
>
> [ shrug ] There is a *boatload* of new stuff in SQL2003, most of which
> we probably won't ever implement. The foundation alone has enough new
> cruft to keep us busy for years ... never mind stuff that shows up only
> in Part 14.
>
> Basically, SQL2003 is way too big for the argument "it's in the spec"
> to be an automatic trump card for putting features into core PG.
> We have to think about distribution size and maintainability versus
> the usefulness of specific features.
>
> If there were a serious amount of demand for the SQL2003 XML features
> then I wouldn't be averse to putting them in, but right now it looks
> like bloat with little redeeming social value. Who other than the
> submitter has asked for this? I don't even see "XML" listed in TODO.

Well, we have been pushing XML out of the database into side projects,
which I think is the way to go until we have an XML-standard export
format. With this one, I don't see how we can do it externally and meet
the spec. I would like to see an outline of what XML things we support
and what we don't. Is this XML patch a major missing thing? No idea.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgman(at)candle(dot)pha(dot)pa(dot)us
Cc: david(at)fetter(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-06-15 04:45:27
Message-ID: BAY20-F16DE8B31443E86543B347BF9820@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

>
>Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Do we want this XML patch in the backend? It needs syntax support so I
> > don't see how it could be done in /contrib. Attached.
>
>I think this could easily be done as an external module if it didn't
>insist on random additions to the function-call syntax. AFAICS there
>isn't anything there that couldn't be done without that.
>

No, I am sorry, it's cannot be external module. Or cannot be without losting
functionality and elegance of SQL/XML. It's really depend on parser. People
which generate XML from database used it. But not now, because PostgreSQL
don't support it. But it's the moust faster way for generating XML files,
10x faster then PHP or Perl. Please look again on this patch. I am not sure
about solution without ANSI compatibility.

Regards
Pavel Stehule

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci.
http://messenger.msn.cz/


From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: pgman(at)candle(dot)pha(dot)pa(dot)us, tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: peter_e(at)gmx(dot)net, pgsql-patches(at)postgresql(dot)org
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-06-15 04:51:25
Message-ID: BAY20-F9025164D2456219FA0398F9820@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

>
>Well, we have been pushing XML out of the database into side projects,
>which I think is the way to go until we have an XML-standard export
>format. With this one, I don't see how we can do it externally and meet
>the spec. I would like to see an outline of what XML things we support
>and what we don't. Is this XML patch a major missing thing? No idea.
>
We don't need export XML. I need XML directly from database. I understand so
this patch add some rows to server, but it's save thousands lines on client
sides. Every AJAX or .NET scripts can use it.

Regards
Pavel Stehule

_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/


From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us, peter_e(at)gmx(dot)net
Cc: pgsql-patches(at)postgresql(dot)org, pgman(at)candle(dot)pha(dot)pa(dot)us
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-06-15 05:02:55
Message-ID: BAY20-F16F44C77BE95C75E57BD9EF9820@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Hello
>
>If there were a serious amount of demand for the SQL2003 XML features
>then I wouldn't be averse to putting them in, but right now it looks
>like bloat with little redeeming social value. Who other than the
>submitter has asked for this? I don't even see "XML" listed in TODO.

1. integrating SQL/XML into engine put some possibilities for faster and
eficient generating XML file. Is important for generating large XML files.
XML has recursive sturucture and normal (classic functions) interface isn't
eficient, because it's need more XML->text conversions. Inside parser I know
if I inside recursion or outside.

2. Some people use my patch. Without my patch there will be more request for
it.

Best regards
Pavel Stehule

_________________________________________________________________
Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)hotmail(dot)com>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, peter_e(at)gmx(dot)net, pgsql-patches(at)postgresql(dot)org
Subject: Re: SQL/XML publishing function experimental patch II
Date: 2006-06-15 15:56:43
Message-ID: 200606151556.k5FFuhM18174@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Pavel Stehule wrote:
> Hello
> >
> >If there were a serious amount of demand for the SQL2003 XML features
> >then I wouldn't be averse to putting them in, but right now it looks
> >like bloat with little redeeming social value. Who other than the
> >submitter has asked for this? I don't even see "XML" listed in TODO.
>
> 1. integrating SQL/XML into engine put some possibilities for faster and
> eficient generating XML file. Is important for generating large XML files.
> XML has recursive sturucture and normal (classic functions) interface isn't
> eficient, because it's need more XML->text conversions. Inside parser I know
> if I inside recursion or outside.
>
> 2. Some people use my patch. Without my patch there will be more request for
> it.

OK, got it. One thing I would like is a summary of what we support
directly, in /contrib, and externally. I would like something that can
be eventually put in our documentation, because right now, people say,
"I need XML", and they are not clear about exactly what they need.
Things like:

storing xml
searching xml
exporting xml
building xml structures
etc.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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-06-15 15:58:30
Message-ID: 200606151758.31030.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane wrote:
> If there were a serious amount of demand for the SQL2003 XML features
> then I wouldn't be averse to putting them in, but right now it looks
> like bloat with little redeeming social value. Who other than the
> submitter has asked for this? I don't even see "XML" listed in TODO.

There have been inquiries about some kind of XML support every few weeks
for years now. Clearly, we need to sort out what that really means.
I'm preparing a session about that for the Toronto summit.

There is now a Summer of Code project for creating an XML data type,
which should be integrated with this work and the xpath stuff in
contrib. Plus, there were a few rejected projects about creating
special index support for XML.

Whether or not this part is really useful I can't judge, but it's part
of an overall system.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: 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-06-15 16:14:29
Message-ID: 28701.1150388069@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> There have been inquiries about some kind of XML support every few weeks
> for years now. Clearly, we need to sort out what that really means.

Agreed. We need a road map of some sort.

> I'm preparing a session about that for the Toronto summit.

Looking forward to it...

regards, tom lane


From: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "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-06-15 22:22:23
Message-ID: e431ff4c0606151522n28afa2e3we7a65e20d275db93@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

I'll prepare some classification of differend kinds of XML support,
including a brief overview for oracle, sql server and db2 (I'm a
person who works on that SoC project)

As for Pavel's patch, I think it's pretty complete piece of several
SQL/XML functions and could be usefull for people (e.g for me).

But it isn't fulll 'XML support' yet. On the road to XML type I see
more grammar hacks (if standard compliance should be established) -
for example, one of possible xml-column declarations is '...col1
XML(SEQUENCE (UNTYPED))...', what breaks postgres' syntax for types
descriptors, if I'm not mistaken..

Yes, standard is bloated and there is no dbms that supports part 14
entirely (e.g., oracle doesn't accept xquery sequnces for xml type, ms
calls its type 'xmltype' and doesn't support sql/xml functions), but
it contains some collection of experience. Many people want to store
xml and to work with it - so some work should take place. Another
point: no open-source dbms has good xml support, so... Anyway, it
would be attractive feature (speaking about marketing - look at the
db2 v.9 'viper' description: xml, xml, xml...)

On 6/15/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > There have been inquiries about some kind of XML support every few weeks
> > for years now. Clearly, we need to sort out what that really means.
>
> Agreed. We need a road map of some sort.
>
> > I'm preparing a session about that for the Toronto summit.
>
> Looking forward to it...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

--
Best regards,
Nikolay


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: nikolay(at)samokhvalov(dot)com
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
Date: 2006-08-22 03:47:25
Message-ID: 200608220347.k7M3lPs14556@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


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.

---------------------------------------------------------------------------

Nikolay Samokhvalov wrote:
> I'll prepare some classification of differend kinds of XML support,
> including a brief overview for oracle, sql server and db2 (I'm a
> person who works on that SoC project)
>
> As for Pavel's patch, I think it's pretty complete piece of several
> SQL/XML functions and could be usefull for people (e.g for me).
>
> But it isn't fulll 'XML support' yet. On the road to XML type I see
> more grammar hacks (if standard compliance should be established) -
> for example, one of possible xml-column declarations is '...col1
> XML(SEQUENCE (UNTYPED))...', what breaks postgres' syntax for types
> descriptors, if I'm not mistaken..
>
> Yes, standard is bloated and there is no dbms that supports part 14
> entirely (e.g., oracle doesn't accept xquery sequnces for xml type, ms
> calls its type 'xmltype' and doesn't support sql/xml functions), but
> it contains some collection of experience. Many people want to store
> xml and to work with it - so some work should take place. Another
> point: no open-source dbms has good xml support, so... Anyway, it
> would be attractive feature (speaking about marketing - look at the
> db2 v.9 'viper' description: xml, xml, xml...)
>
>
> On 6/15/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > > There have been inquiries about some kind of XML support every few weeks
> > > for years now. Clearly, we need to sort out what that really means.
> >
> > Agreed. We need a road map of some sort.
> >
> > > I'm preparing a session about that for the Toronto summit.
> >
> > Looking forward to it...
> >
> > regards, tom lane
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: don't forget to increase your free space map settings
> >
>
>
> --
> Best regards,
> Nikolay
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


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
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