Lists: | pgsql-hackerspgsql-patches |
---|
From: | "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | --enable-xml instead of --with-libxml? |
Date: | 2007-02-20 23:59:03 |
Message-ID: | e431ff4c0702201559t5cab593cl984d7c32811c6761@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Now we have --with-libxml (and USE_LIBXML constant for #ifdef-s), what
is not absolutely right: XML support is smth that is more general than
"using libxml2 library". E.g., some SQL/XML publishing functions (such
as XMLPI) do not deal with libxml2.
Also, in the future more "non-libxml" functionality could be added to
"XML support" (well, Peter's recent SQL-to-XML mapping functions prove
it).
I think it'd better to rename configure option to --enable-xml and
USE_LIBXML to ENABLE_XML. I'll do it if there are no objections.
--
Best regards,
Nikolay
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | nikolay(at)samokhvalov(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: --enable-xml instead of --with-libxml? |
Date: | 2007-02-21 13:59:30 |
Message-ID: | 20070221135930.GM25424@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Nikolay Samokhvalov wrote:
> Now we have --with-libxml (and USE_LIBXML constant for #ifdef-s), what
> is not absolutely right: XML support is smth that is more general than
> "using libxml2 library". E.g., some SQL/XML publishing functions (such
> as XMLPI) do not deal with libxml2.
>
> Also, in the future more "non-libxml" functionality could be added to
> "XML support" (well, Peter's recent SQL-to-XML mapping functions prove
> it).
>
> I think it'd better to rename configure option to --enable-xml and
> USE_LIBXML to ENABLE_XML. I'll do it if there are no objections.
I think it would be better that leaving --with-libxml out (i.e.
compiling without libxml2 support) would only disable those parts in XML
functionality that require libxml2 for their implementation; the rest of
the stuff should be compiled in regardless of the setting.
Is this not what is done currently?
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, nikolay(at)samokhvalov(dot)com |
Subject: | Re: --enable-xml instead of --with-libxml? |
Date: | 2007-02-21 14:38:41 |
Message-ID: | 200702211538.42663.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Nikolay Samokhvalov wrote:
> Also, in the future more "non-libxml" functionality could be added to
> "XML support" (well, Peter's recent SQL-to-XML mapping functions
> prove it).
But note that those are not controlled by the --with-libxml switch.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From: | "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: --enable-xml instead of --with-libxml? |
Date: | 2007-02-22 08:32:56 |
Message-ID: | e431ff4c0702220032i72e4052esbdf7bb3ffa7b4d7d@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
On 2/21/07, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> I think it would be better that leaving --with-libxml out (i.e.
> compiling without libxml2 support) would only disable those parts in XML
> functionality that require libxml2 for their implementation; the rest of
> the stuff should be compiled in regardless of the setting.
>
> Is this not what is done currently?
>
The thing is that some functions of "XML support" are based on
libxml2, some are not. libxml2 contains useful routines to deal with
XML data. Now we have: XMLELEMENT uses such routines and XMLPI
doesn't. Actually, all SQL/XML publishing function could be
implemented w/o libxml2 -- but it's more convenient to use those
routines in some cases... And there is no guarantee that functions
that don't currently use libxml2 will not use them in future.
What I want to propose is just simplification -- consider all XML
stuff as one package, including XML type, SQL/XML publishing, XPath
funcs, additional publishing functions recently added by Peter (btw,
who knows -- maybe libxml2 will help to improve them somehow in
future?), etc.
--
Best regards,
Nikolay
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, nikolay(at)samokhvalov(dot)com |
Subject: | Re: --enable-xml instead of --with-libxml? |
Date: | 2007-02-22 10:29:22 |
Message-ID: | 200702221129.22394.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Nikolay Samokhvalov wrote:
> What I want to propose is just simplification -- consider all XML
> stuff as one package, including XML type, SQL/XML publishing, XPath
> funcs, additional publishing functions recently added by Peter (btw,
> who knows -- maybe libxml2 will help to improve them somehow in
> future?), etc.
Well, in terms of predictable interfaces, there is some merit in your
argument.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | nikolay(at)samokhvalov(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: --enable-xml instead of --with-libxml? |
Date: | 2007-03-27 01:55:44 |
Message-ID: | 200703270155.l2R1tiB29033@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Where are we on this? Peter thought the consistency makes sense, but if
we can provide functionality that doesn't require libxml, why not
do it?
---------------------------------------------------------------------------
Nikolay Samokhvalov wrote:
> On 2/21/07, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> > I think it would be better that leaving --with-libxml out (i.e.
> > compiling without libxml2 support) would only disable those parts in XML
> > functionality that require libxml2 for their implementation; the rest of
> > the stuff should be compiled in regardless of the setting.
> >
> > Is this not what is done currently?
> >
>
> The thing is that some functions of "XML support" are based on
> libxml2, some are not. libxml2 contains useful routines to deal with
> XML data. Now we have: XMLELEMENT uses such routines and XMLPI
> doesn't. Actually, all SQL/XML publishing function could be
> implemented w/o libxml2 -- but it's more convenient to use those
> routines in some cases... And there is no guarantee that functions
> that don't currently use libxml2 will not use them in future.
>
> What I want to propose is just simplification -- consider all XML
> stuff as one package, including XML type, SQL/XML publishing, XPath
> funcs, additional publishing functions recently added by Peter (btw,
> who knows -- maybe libxml2 will help to improve them somehow in
> future?), etc.
>
> --
> Best regards,
> Nikolay
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From: | "Nikolay Samokhvalov" <nikolay(at)samokhvalov(dot)com> |
---|---|
To: | "Bruce Momjian" <bruce(at)momjian(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: --enable-xml instead of --with-libxml? |
Date: | 2007-04-04 13:05:33 |
Message-ID: | e431ff4c0704040605o7398c3dbh3226b32788d4b9de@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
On 3/27/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
>
> Where are we on this? Peter thought the consistency makes sense, but if
> we can provide functionality that doesn't require libxml, why not
> do it?
I'm still for --enable-xml and putting _everything_ XML-related under this
option. My main points are:
- we cannot guarantee that existing libxml2-free functions will not require
them in the future (because libxml2 contains useful routines);
- libxml2-free functions (e.g. Peter's XML mapping functions,
http://momjian.us/main/writings/pgsql/sgml/functions-xml.html#FUNCTIONS-XML-MAPPING)
produce XML values, but we cannot use XPath function for them unless we have
libxml2;
- people will make errors, trying to understand what needs libxml2, and
what doesn't -- approach "all or nothing" is simple and straightforward;
Well, it seems that I have no more arguments :-) If there is no objections,
I'll send the patch tonight.
If I am wrong and it's better to leave libxml2-free capabilities, then IMHO
we need to reflect it explicitly in the docs, what requires libxml2, and
what doesn't
--
Best regards,
Nikolay
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Nikolay Samokhvalov <nikolay(at)samokhvalov(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: --enable-xml instead of --with-libxml? |
Date: | 2007-04-04 20:45:51 |
Message-ID: | 200704042045.l34KjpM05680@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Nikolay Samokhvalov wrote:
> On 3/27/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >
> >
> > Where are we on this? Peter thought the consistency makes sense, but if
> > we can provide functionality that doesn't require libxml, why not
> > do it?
>
>
> I'm still for --enable-xml and putting _everything_ XML-related under this
> option. My main points are:
> - we cannot guarantee that existing libxml2-free functions will not require
> them in the future (because libxml2 contains useful routines);
> - libxml2-free functions (e.g. Peter's XML mapping functions,
> http://momjian.us/main/writings/pgsql/sgml/functions-xml.html#FUNCTIONS-XML-MAPPING)
> produce XML values, but we cannot use XPath function for them unless we have
> libxml2;
> - people will make errors, trying to understand what needs libxml2, and
> what doesn't -- approach "all or nothing" is simple and straightforward;
>
>
> Well, it seems that I have no more arguments :-) If there is no objections,
> I'll send the patch tonight.
> If I am wrong and it's better to leave libxml2-free capabilities, then IMHO
> we need to reflect it explicitly in the docs, what requires libxml2, and
> what doesn't
Agreed, let's do the later and update the documentation. Also, do we
output a helpful message if someone tries to use a libxml2 function that
isn't available.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From: | "Nikolay Samokhvalov" <nikolay(at)samokhvalov(dot)com> |
---|---|
To: | "Bruce Momjian" <bruce(at)momjian(dot)us> |
Cc: | "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: --enable-xml instead of --with-libxml? |
Date: | 2007-04-04 21:22:48 |
Message-ID: | e431ff4c0704041422i4f31740etc9615bb99d719705@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
On 4/5/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> Nikolay Samokhvalov wrote:
> [...]
> > If I am wrong and it's better to leave libxml2-free capabilities, then
> IMHO
> > we need to reflect it explicitly in the docs, what requires libxml2, and
> > what doesn't
>
> Agreed, let's do the later and update the documentation.
So, you are agreed that I am wrong :-) Well... I would be happy hear some
arguments, but I cannot insist on it :-)
Also, do we
> output a helpful message if someone tries to use a libxml2 function that
> isn't available.
Yep, here it is:
INSERT INTO xmltest VALUES (1, '<value>one</value>');
ERROR: no XML support in this installation
I suppose we should change it to "no libxml2 support in this installation",
shouldn't we?
--
Best regards,
Nikolay
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Nikolay Samokhvalov <nikolay(at)samokhvalov(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] --enable-xml instead of --with-libxml? |
Date: | 2007-04-05 01:47:28 |
Message-ID: | 200704050147.l351lSi18429@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
I have applied the following patch which adds documentation and an
improved error message for an installation that does not use
--with-libxml.
---------------------------------------------------------------------------
Nikolay Samokhvalov wrote:
> On 4/5/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >
> > Nikolay Samokhvalov wrote:
> > [...]
> > > If I am wrong and it's better to leave libxml2-free capabilities, then
> > IMHO
> > > we need to reflect it explicitly in the docs, what requires libxml2, and
> > > what doesn't
> >
> > Agreed, let's do the later and update the documentation.
>
>
> So, you are agreed that I am wrong :-) Well... I would be happy hear some
> arguments, but I cannot insist on it :-)
>
>
> Also, do we
> > output a helpful message if someone tries to use a libxml2 function that
> > isn't available.
>
>
> Yep, here it is:
>
> INSERT INTO xmltest VALUES (1, '<value>one</value>');
> ERROR: no XML support in this installation
>
> I suppose we should change it to "no libxml2 support in this installation",
> shouldn't we?
>
>
>
> --
> Best regards,
> Nikolay
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/diff | text/x-diff | 3.5 KB |
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Nikolay Samokhvalov <nikolay(at)samokhvalov(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] --enable-xml instead of --with-libxml? |
Date: | 2007-04-05 12:18:25 |
Message-ID: | 4614E911.3050305@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Bruce Momjian wrote:
> I have applied the following patch which adds documentation and an
> improved error message for an installation that does not use
> --with-libxml.
>
>
and you broke the buildfarm ... you need to fix the regression test.
cheers
andrew