Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-06 Thread Jim Jones
On 06.11.23 11:49, Daniel Gustafsson wrote: > I took another look at this today, fixes the above mentioned typos and some > tiny cosmetic things and pushed it. > > -- > Daniel Gustafsson > Awesome! Thanks Daniel and Vik for reviewing and pushing this patch :) -- Jim

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-06 Thread Daniel Gustafsson
> On 4 Nov 2023, at 15:01, Vik Fearing wrote: > > On 11/3/23 21:28, Jim Jones wrote: >> On 03.11.23 19:05, Vik Fearing wrote: >>> I was thinking of something much shorter than that. Such as >>> >>> X038XMLText YES supported except for RETURNING >> v6 attached includes this chang

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-04 Thread Vik Fearing
On 11/3/23 21:28, Jim Jones wrote: On 03.11.23 19:05, Vik Fearing wrote: I was thinking of something much shorter than that.  Such as     X038    XMLText YES supported except for RETURNING v6 attached includes this change and the doc addition from Daniel. There are some typos in t

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-03 Thread Jim Jones
On 03.11.23 19:05, Vik Fearing wrote: > I was thinking of something much shorter than that.  Such as > >     X038    XMLText YES supported except for RETURNING v6 attached includes this change and the doc addition from Daniel. Thanks! -- JimFrom 703c882c254826f10f7bc076a2071741d086e8f6

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-03 Thread Vik Fearing
On 11/3/23 17:14, Jim Jones wrote: Hi Daniel, hi Vik, Thanks a lot for the review! On 03.11.23 16:45, Vik Fearing wrote: We should put a short version of the disclaimer in sql_features.txt as well. You mean to add a disclaimer in the X038 entry? Something along these lines perhaps? X038    X

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-03 Thread Jim Jones
Hi Daniel, hi Vik, Thanks a lot for the review! On 03.11.23 16:45, Vik Fearing wrote: > We should put a short version of the disclaimer in sql_features.txt as > well. You mean to add a disclaimer in the X038 entry? Something along these lines perhaps? X038    XMLText            YES     It does n

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-03 Thread Vik Fearing
On 11/3/23 16:30, Daniel Gustafsson wrote: On 25 Aug 2023, at 17:40, Jim Jones wrote: Just like Vik says upthread we can't really claim X038 conformance without a disclaimer, so I've added a 0002 which adds this to the XML spec conformance page in the docs. We should put a short version of

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-03 Thread Daniel Gustafsson
> On 25 Aug 2023, at 17:40, Jim Jones wrote: > On 25.08.23 16:49, Vik Fearing wrote: >> I do not think this should be addressed in this patch because there are >> quite a lot of functions that need to handle this. > > v4 attached. I had a look at v4 of this patch and apart from pgindenting and

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-26 Thread Pavel Stehule
so 26. 8. 2023 v 22:47 odesílatel Chapman Flack napsal: > On 2023-08-26 16:00, Pavel Stehule wrote: > > Saxon can be an interesting library, but nobody knows if integration > > with > > Postgres is possible. Their C implementation is Java compiled/executed > > by GraalV. > > Indeed, such an integ

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-26 Thread Chapman Flack
On 2023-08-26 16:00, Pavel Stehule wrote: Saxon can be an interesting library, but nobody knows if integration with Postgres is possible. Their C implementation is Java compiled/executed by GraalV. Indeed, such an integration would probably not be in core. Of the two possible-ways-forward des

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-26 Thread Pavel Stehule
Hi so 26. 8. 2023 v 21:23 odesílatel Chapman Flack napsal: > On 2023-08-26 13:02, Alvaro Herrera wrote: > > Sadly, all the projects seem to have been pretty much abandoned in the > > meantime. Zorba has been dead for 9 years, xqilla for 6. Even XQC, > > the > > API they claim to implement, is

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-26 Thread Chapman Flack
On 2023-08-26 13:02, Alvaro Herrera wrote: Sadly, all the projects seem to have been pretty much abandoned in the meantime. Zorba has been dead for 9 years, xqilla for 6. Even XQC, the API they claim to implement, is dead. Sounds like bad news for the "XQC as integration point" proposal, a

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-26 Thread Alvaro Herrera
On 2023-Aug-25, Chapman Flack wrote: > On 2023-08-25 10:49, Vik Fearing wrote: > > I do not think this should be addressed in this patch because > > there are quite a lot of functions that need to handle this. > > Indeed, as described in [0], we still largely provide the SQL/XML:2003 > notion of

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-25 Thread Vik Fearing
On 8/25/23 17:56, Chapman Flack wrote: [0] https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL/XML_Standards I was not aware of this page. What a wealth of information! -- Vik Fearing

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-25 Thread Chapman Flack
On 2023-08-25 10:49, Vik Fearing wrote: I do not think this should be addressed in this patch because there are quite a lot of functions that need to handle this. Indeed, as described in [0], we still largely provide the SQL/XML:2003 notion of a single XML datatype, not the distinguishable XML(

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-25 Thread Jim Jones
On 25.08.23 16:49, Vik Fearing wrote: I am talking specifically about this: @@ -505,6 +506,10 @@ xmlcomment(PG_FUNCTION_ARGS) appendStringInfoText(&buf, arg); appendStringInfoString(&buf, "-->"); + + + + PG_RETURN_XML_P(stringinfo_to_xmltype(&buf));  #else NO_XML_SUPPORT();

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-25 Thread Vik Fearing
On 8/25/23 14:42, Jim Jones wrote: Hi Vik Thanks for reviewing my patch! Thank you for writing it! On 25.08.23 12:05, Vik Fearing wrote: I am replying to this email, but my comments are based on the v2 patch. Thank you for working on this, and I think this is a valuable addition. However,

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-25 Thread Daniel Gustafsson
> On 25 Aug 2023, at 14:42, Jim Jones wrote: > Is there any tool like pgindent to take care of it automatically? No, pgindent doesn't address whitespace, only indentation of non-whitespace. -- Daniel Gustafsson

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-25 Thread Jim Jones
Hi Vik Thanks for reviewing my patch! On 25.08.23 12:05, Vik Fearing wrote: I am replying to this email, but my comments are based on the v2 patch. Thank you for working on this, and I think this is a valuable addition. However, I have two issues with it. 1) There seems to be several spurio

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-25 Thread Vik Fearing
On 3/25/23 12:49, Jim Jones wrote: Hi, This small patch proposes the implementation of the standard SQL/XML function XMLText (X038). It basically converts a text parameter into an xml text node. It uses the libxml2 function xmlEncodeSpecialChars[1] to escape possible predefined entities. Th

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-08-25 Thread Jim Jones
On 25.03.23 13:25, I wrote: I just realized that I forgot to add a few examples to my last message :D postgres=# SELECT xmltext('foo ´/[({bar?})]\`');   xmltext  foo ´/[({bar?})]\` (1 row) postgres=# SELECT xmltext('foo & ');     xmltext ---  foo

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-03-25 Thread Jim Jones
On 25.03.23 12:53, Pavel Stehule wrote: so 25. 3. 2023 v 12:49 odesílatel Jim Jones napsal: Hi, This small patch proposes the implementation of the standard SQL/XML function XMLText (X038). It basically converts a text parameter into an xml text node. It uses the libxml2

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-03-25 Thread Pavel Stehule
so 25. 3. 2023 v 12:49 odesílatel Jim Jones napsal: > Hi, > > This small patch proposes the implementation of the standard SQL/XML > function XMLText (X038). It basically converts a text parameter into an > xml text node. It uses the libxml2 function xmlEncodeSpecialChars[1] to > escape possible

[PATCH] Add XMLText function (SQL/XML X038)

2023-03-25 Thread Jim Jones
Hi, This small patch proposes the implementation of the standard SQL/XML function XMLText (X038). It basically converts a text parameter into an xml text node. It uses the libxml2 function xmlEncodeSpecialChars[1] to escape possible predefined entities. This patch also contains documentation