Re: PostgreSQL vs SQL/XML Standards

2019-06-01 Thread Chapman Flack
On 05/31/19 16:04, Alvaro Herrera wrote: > https://www.iso.org/standard/41528.html "XQuery Regular Expression > Support in SQL" Although I hadn't seen that particular document, I did see those in the SQL spec and mention them in the wiki page [1]. I should point out that's also a conformance not

Re: PostgreSQL vs SQL/XML Standards

2019-05-31 Thread Alvaro Herrera
On 2018-Oct-24, Chapman Flack wrote: > Inspired by the wiki page on PostgreSQL vs SQL Standard in general, > I have made another wiki page specifically about $subject. I hope > this was not presumptuous, and invite review / comment. I have not > linked to it from any other page yet. In the SQL St

Re: PostgreSQL vs SQL/XML Standards

2019-03-14 Thread Alvaro Herrera
On 2019-Mar-14, Pavel Stehule wrote: > I looking to code > > void(*nodefree) (xmlNodePtr) = NULL; > volatile xmlBufferPtr buf = NULL; > > should not be "nodefree" volatile too? Ah, good question. I remember I had it volatile and removed it for some reason, though I don'

Re: PostgreSQL vs SQL/XML Standards

2019-03-14 Thread Pavel Stehule
Hi pá 8. 3. 2019 v 19:44 odesílatel Alvaro Herrera napsal: > On 2019-Mar-08, Alvaro Herrera wrote: > > > > Maybe we can call explicitly xmlFreeDoc instead xmlFreeNode > > > > > > some like > > > > > > if (cur_copy->type == XML_DOCUMENT_NODE) > > > xmlFreeDoc((xmlDocPtr) cur_copy); > > > else >

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Pavel Stehule
pá 8. 3. 2019 v 19:48 odesílatel Pavel Stehule napsal: > > > pá 8. 3. 2019 v 19:44 odesílatel Alvaro Herrera > napsal: > >> On 2019-Mar-08, Alvaro Herrera wrote: >> >> > > Maybe we can call explicitly xmlFreeDoc instead xmlFreeNode >> > > >> > > some like >> > > >> > > if (cur_copy->type == XML_

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Pavel Stehule
pá 8. 3. 2019 v 19:44 odesílatel Alvaro Herrera napsal: > On 2019-Mar-08, Alvaro Herrera wrote: > > > > Maybe we can call explicitly xmlFreeDoc instead xmlFreeNode > > > > > > some like > > > > > > if (cur_copy->type == XML_DOCUMENT_NODE) > > > xmlFreeDoc((xmlDocPtr) cur_copy); > > > else > > >

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Alvaro Herrera
On 2019-Mar-08, Alvaro Herrera wrote: > > Maybe we can call explicitly xmlFreeDoc instead xmlFreeNode > > > > some like > > > > if (cur_copy->type == XML_DOCUMENT_NODE) > > xmlFreeDoc((xmlDocPtr) cur_copy); > > else > > xmlFreeNode(cur_copy); > > > > This looks most correct fix for me. What

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Alvaro Herrera
(I spent some time trying to reproduce the original bug, but was interrupted for lunch before getting a useful installation. I find it a bit strange that it doesn't crash in x86_64, mind ...) On 2019-Mar-08, Pavel Stehule wrote: > It fixes current issue, but I afraid so these two routines are no

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Pavel Stehule
pá 8. 3. 2019 v 15:31 odesílatel Alvaro Herrera napsal: > On 2019-Mar-08, Pavel Stehule wrote: > > > looks like error in xmlXPathCompiledEval function, that produce little > bit > > broken result for XML_DOCUMENT_NODE type. I hadn't this problem with > > libxml2 2.7.6 64bit, but I seen this issue

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Alvaro Herrera
On 2019-Mar-08, Pavel Stehule wrote: > looks like error in xmlXPathCompiledEval function, that produce little bit > broken result for XML_DOCUMENT_NODE type. I hadn't this problem with > libxml2 2.7.6 64bit, but I seen this issue on same version on 32bit. > > Currently I had not fresh 32 bit syst

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Pavel Stehule
pá 8. 3. 2019 v 13:20 odesílatel Alvaro Herrera napsal: > On 2019-Mar-08, Pavel Stehule wrote: > > > looks like error in xmlXPathCompiledEval function, that produce little > bit > > broken result for XML_DOCUMENT_NODE type. I hadn't this problem with > > libxml2 2.7.6 64bit, but I seen this issue

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Alvaro Herrera
On 2019-Mar-08, Pavel Stehule wrote: > looks like error in xmlXPathCompiledEval function, that produce little bit > broken result for XML_DOCUMENT_NODE type. I hadn't this problem with > libxml2 2.7.6 64bit, but I seen this issue on same version on 32bit. > > Currently I had not fresh 32 bit syst

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Pavel Stehule
pá 8. 3. 2019 v 7:41 odesílatel Pavel Stehule napsal: > Hi > > pá 8. 3. 2019 v 3:44 odesílatel Alvaro Herrera > napsal: > >> On 2019-Mar-07, Alvaro Herrera wrote: >> >> > On 2019-Feb-11, Chapman Flack wrote: >> > >> > > xmltable-xpath-result-processing-bugfix-6.patch includes a >> regress/expect

Re: PostgreSQL vs SQL/XML Standards

2019-03-08 Thread Pavel Stehule
pá 8. 3. 2019 v 3:44 odesílatel Alvaro Herrera napsal: > On 2019-Mar-07, Alvaro Herrera wrote: > > > On 2019-Feb-11, Chapman Flack wrote: > > > > > xmltable-xpath-result-processing-bugfix-6.patch includes a > regress/expected > > > output for the no-libxml case that was left out of -5. > > > > Pu

Re: PostgreSQL vs SQL/XML Standards

2019-03-07 Thread Pavel Stehule
Hi pá 8. 3. 2019 v 3:44 odesílatel Alvaro Herrera napsal: > On 2019-Mar-07, Alvaro Herrera wrote: > > > On 2019-Feb-11, Chapman Flack wrote: > > > > > xmltable-xpath-result-processing-bugfix-6.patch includes a > regress/expected > > > output for the no-libxml case that was left out of -5. > > >

Re: PostgreSQL vs SQL/XML Standards

2019-03-07 Thread Alvaro Herrera
On 2019-Mar-07, Alvaro Herrera wrote: > On 2019-Feb-11, Chapman Flack wrote: > > > xmltable-xpath-result-processing-bugfix-6.patch includes a regress/expected > > output for the no-libxml case that was left out of -5. > > Pushed this one, with some trivial changes: I renamed and relocated > Pave

Re: PostgreSQL vs SQL/XML Standards

2019-03-07 Thread Alvaro Herrera
On 2019-Feb-11, Chapman Flack wrote: > xmltable-xpath-result-processing-bugfix-6.patch includes a regress/expected > output for the no-libxml case that was left out of -5. Pushed this one, with some trivial changes: I renamed and relocated Pavel's function to strdup-and-free and fused the new tes

Re: PostgreSQL vs SQL/XML Standards

2019-03-07 Thread Chapman Flack
On 3/7/19 10:08 AM, Alvaro Herrera wrote: > I just pushed this one to pg12 only: >> xmltable-xmlexists-passing-mechanisms-3.patch Thanks! > I removed the words "first appears in SQL:2006" from the new doc > paragraph; we used to have similar phrases scattered here and there but > were removed ye

Re: PostgreSQL vs SQL/XML Standards

2019-03-07 Thread Alvaro Herrera
On 2019-Feb-11, Chapman Flack wrote: > Interpreting the crickets as approval, I have changed the title of the > CF entry, and the status back to Needs Review, with these patches > attached: I just pushed this one to pg12 only: > xmltable-xmlexists-passing-mechanisms-3.patch I removed the words

Re: Re: PostgreSQL vs SQL/XML Standards

2019-03-07 Thread David Steele
On 3/6/19 6:16 PM, Chapman Flack wrote: This CF entry shows Pavel and me as reviewers, but the included patches were also produced by one or the other of us, so additional review by someone who isn't us seems appropriate. :) Would it make sense to remove one or both of us from the 'reviewers' fi

Re: PostgreSQL vs SQL/XML Standards

2019-03-06 Thread Chapman Flack
This CF entry shows Pavel and me as reviewers, but the included patches were also produced by one or the other of us, so additional review by someone who isn't us seems appropriate. :) Would it make sense to remove one or both of us from the 'reviewers' field in the app, to make it more obviously

Re: PostgreSQL vs SQL/XML Standards

2019-03-01 Thread Ramanarayana
Hi, Yes it is working fine with \a option in psql. Cheers Ram 4.0

Re: PostgreSQL vs SQL/XML Standards

2019-03-01 Thread Chapman Flack
On 03/01/19 07:15, Ramanarayana wrote: > Hi, > I have tested bug fixes provided by all the patches. They are working > great. I found one minor issue > > select * from xmltable('*' PASSING 'pre arg?>&deeppost' COLUMNS x XML PATH '/'); > > The above query returns the xml. But there is an extra pl

Re: PostgreSQL vs SQL/XML Standards

2019-02-10 Thread Chapman Flack
Note: I sent an email last night with updated patches, which was not received because of a spamhaus reputation issue for my email provider. In working that out with my provider, at the moment I cannot send email at all, so I am using this comment to explain why the status went back to "needs re

Re: PostgreSQL vs SQL/XML Standards

2019-02-05 Thread Chapman Flack
On 02/01/19 20:20, Michael Paquier wrote: > On Thu, Jan 31, 2019 at 04:26:31PM +0100, Pavel Stehule wrote: >> I'll mark this patch as ready for commiters. > > For now I have moved the patch to the next CF, with the same status. I wonder whether, given the move to next CF, it makes sense to change

Re: PostgreSQL vs SQL/XML Standards

2019-02-01 Thread Michael Paquier
On Thu, Jan 31, 2019 at 04:26:31PM +0100, Pavel Stehule wrote: > I'll mark this patch as ready for commiters. For now I have moved the patch to the next CF, with the same status. -- Michael signature.asc Description: PGP signature

Re: PostgreSQL vs SQL/XML Standards

2019-01-31 Thread Pavel Stehule
so 26. 1. 2019 v 1:38 odesílatel Chapman Flack napsal: > On 01/25/19 00:45, Pavel Stehule wrote: > > pá 25. 1. 2019 v 5:46 odesílatel Chapman Flack > > napsal: > >> I am: > >> - re-attaching xmltable-xpath-result-processing-bugfix-5.patch unchanged > >> (just so CF app does not lose track) > >

Re: PostgreSQL vs SQL/XML Standards

2019-01-25 Thread Chapman Flack
On 01/25/19 22:53, Pavel Stehule wrote: > Documentation review will be harder - I am not a native speaker and I have > not a necessary knowledges of XQuery (probably only you have this > knowledge). The doc patch is enough that I think it would be ideal to somehow attract a native speaker who has

Re: PostgreSQL vs SQL/XML Standards

2019-01-25 Thread Chapman Flack
On 01/25/19 19:37, Chapman Flack wrote: > There is still nothing in this patch set to address [1], though that > also seems worth doing, perhaps in another patch, and probably not > difficult, perhaps needing only a regex. Heck, it could be even simpler than that. If some XML input has a DTD, the

Re: PostgreSQL vs SQL/XML Standards

2019-01-25 Thread Pavel Stehule
Hi so 26. 1. 2019 v 4:25 odesílatel Chapman Flack napsal: > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: not tested > Documentation:not tested

Re: PostgreSQL vs SQL/XML Standards

2019-01-25 Thread Chapman Flack
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested As the reporter of the issues raised in this email thread, I've revie

Re: PostgreSQL vs SQL/XML Standards

2019-01-24 Thread Pavel Stehule
pá 25. 1. 2019 v 5:46 odesílatel Chapman Flack napsal: > Hi, > > On 01/21/19 01:33, Pavel Stehule wrote: > > ne 20. 1. 2019 23:13 odesílatel Chapman Flack > > napsal: > > >> form (whether or not the word LATERAL is used), and re-executes xmltable > >> whenever the referenced column value changes

Re: PostgreSQL vs SQL/XML Standards

2019-01-21 Thread Chapman Flack
Hi, In two places in the XMLTABLE implementation (XmlTableFetchRow, iterating through a nodeset returned by the row_expression, and XmlTableGetValue, going through a nodeset returned by the column_expression), the iteration proceeds in index order through xpathobj->nodesetval->nodeTab. The same h

Re: PostgreSQL vs SQL/XML Standards

2019-01-20 Thread Pavel Stehule
ne 20. 1. 2019 23:13 odesílatel Chapman Flack napsal: > On 01/20/19 12:48, Pavel Stehule wrote: > >> > >> Accordingly, I think the paragraph beginning "Unlike regular PostgreSQL > >> functions," is more likely to perplex readers than to enlighten them. > >> What it says about column_expression do

Re: PostgreSQL vs SQL/XML Standards

2019-01-20 Thread Chapman Flack
On 01/20/19 20:07, Chapman Flack wrote: > So it appears that this example does not depend on any special treatment > of the default_expression. > > Is there an example that can be constructed that would depend on the > special treatment (in which case, the PL/Java implementation would be > unable

Re: PostgreSQL vs SQL/XML Standards

2019-01-20 Thread Chapman Flack
On 01/20/19 17:13, Chapman Flack wrote: > On 01/20/19 12:48, Pavel Stehule wrote: >> regular Postgres' functions has evaluated all arguments before own >> execution. I think so this note is related much more to expressions used as >> defaults. > > Sure, but again, is there an example, or can one e

Re: PostgreSQL vs SQL/XML Standards

2019-01-20 Thread Chapman Flack
On 01/20/19 12:48, Pavel Stehule wrote: >> >> Accordingly, I think the paragraph beginning "Unlike regular PostgreSQL >> functions," is more likely to perplex readers than to enlighten them. >> What it says about column_expression does not seem to lead to any useful >> difference from the behavior

Re: PostgreSQL vs SQL/XML Standards

2019-01-20 Thread Pavel Stehule
> > Accordingly, I think the paragraph beginning "Unlike regular PostgreSQL > functions," is more likely to perplex readers than to enlighten them. > What it says about column_expression does not seem to lead to any useful > difference from the behavior if it were "just like regular PostgreSQL > fu

Re: PostgreSQL vs SQL/XML Standards

2019-01-20 Thread Chapman Flack
On 01/20/19 11:55, Pavel Stehule wrote: > input row mean a row of processed relation. The xml value from this row can > be transformed to 0..M output rows. > > The column filter expressions are evaluated once per input rows, default > expressions are evaluated when it is necessary - possibly once

Re: PostgreSQL vs SQL/XML Standards

2019-01-20 Thread Pavel Stehule
ne 20. 1. 2019 v 17:06 odesílatel Chapman Flack napsal: > Hi, > > On 01/20/19 00:26, Pavel Stehule wrote: > >>> column expressions are evaluated once per row, but XPath expression is > >>> compiled per row too, if I remember well. > >> > >> I looked for evidence of that in the code, but did not

Re: PostgreSQL vs SQL/XML Standards

2019-01-20 Thread Chapman Flack
Hi, On 01/20/19 00:26, Pavel Stehule wrote: >>> column expressions are evaluated once per row, but XPath expression is >>> compiled per row too, if I remember well. >> >> I looked for evidence of that in the code, but did not find it; the >> compilation appears to happen in XmlTableSetColumnFilte

Re: PostgreSQL vs SQL/XML Standards

2019-01-19 Thread Pavel Stehule
ne 20. 1. 2019 v 6:06 odesílatel Chapman Flack napsal: > On 01/19/19 23:49, Pavel Stehule wrote: > > > If I remember, described functionality was implemented in early patches, > > but was removed to simplify code. To now, there was not a request to do > it. > > > > Unfortunately, the documentatio

Re: PostgreSQL vs SQL/XML Standards

2019-01-19 Thread Chapman Flack
On 01/19/19 23:49, Pavel Stehule wrote: > If I remember, described functionality was implemented in early patches, > but was removed to simplify code. To now, there was not a request to do it. > > Unfortunately, the documentation was not fixed. I'll do that, as I'm working in there anyway. :) >

Re: PostgreSQL vs SQL/XML Standards

2019-01-19 Thread Pavel Stehule
ne 20. 1. 2019 v 5:37 odesílatel Chapman Flack napsal: > Working slowly through the documentation, I came upon: > > For XMLTABLE: > > - The xmltable function produces a table based on the given XML value, > an XPath filter to extract rows, and an optional set of column > definitions.

Re: PostgreSQL vs SQL/XML Standards

2019-01-19 Thread Chapman Flack
Working slowly through the documentation, I came upon: For XMLTABLE: - The xmltable function produces a table based on the given XML value, an XPath filter to extract rows, and an optional set of column definitions. ... The mandatory COLUMNS

Re: PostgreSQL vs SQL/XML Standards

2019-01-13 Thread Chapman Flack
There is a bug that remains, in the else if (xpathobj->type == XPATH_STRING) case. As it is now, it simply passes the string value of the result into the output column's type-input function, regardless of the output column type. If the output column type is xml, this will attempt to parse the str

Re: PostgreSQL vs SQL/XML Standards

2019-01-12 Thread Pavel Stehule
ne 13. 1. 2019 v 0:39 odesílatel Chapman Flack napsal: > On 12/30/18 03:23, Pavel Stehule wrote: > > Unfortunately, there is a different releases of libxml2 with different > > error reporting and it is hard (impossible) to prepare for all variants. > :-/ > > > > I prepare xml.out for my FC29 (fre

Re: PostgreSQL vs SQL/XML Standards

2019-01-10 Thread Pavel Stehule
Hi čt 10. 1. 2019 v 14:00 odesílatel Arthur Zakirov napsal: > Hello Pavel, > > On 09.11.2018 07:07, Pavel Stehule wrote: > > I used your patch and append regress tests. I checked the result against > > Oracle. > > I checked the patch with Chap cases. The patch fixes handling of > boolean, number

Re: PostgreSQL vs SQL/XML Standards

2019-01-10 Thread Arthur Zakirov
Hello Pavel, On 09.11.2018 07:07, Pavel Stehule wrote: I used your patch and append regress tests. I checked the result against Oracle. I checked the patch with Chap cases. The patch fixes handling of boolean, number types which mentioned in the wiki. I have a few comments related to the co

Re: PostgreSQL vs SQL/XML Standards

2018-12-30 Thread Pavel Stehule
po 31. 12. 2018 v 3:15 odesílatel Chapman Flack napsal: > On 12/30/18 15:18, Pavel Stehule wrote: > > ne 30. 12. 2018 v 20:06 odesílatel Chapman Flack > > napsal: > >> How difficult would it be to make the grammar constructs that currently > >> accept "BY REF" (only as noise and ignore it) accep

Re: PostgreSQL vs SQL/XML Standards

2018-12-30 Thread Chapman Flack
On 12/30/18 15:18, Pavel Stehule wrote: > ne 30. 12. 2018 v 20:06 odesílatel Chapman Flack > napsal: >> How difficult would it be to make the grammar constructs that currently >> accept "BY REF" (only as noise and ignore it) accept and ignore both BY REF >> and BY VALUE? > > This is difficult que

Re: PostgreSQL vs SQL/XML Standards

2018-12-30 Thread Pavel Stehule
ne 30. 12. 2018 v 20:06 odesílatel Chapman Flack napsal: > On 12/30/18 03:23, Pavel Stehule wrote: > > I agree with more stronger detail description about difference between > > XPath, XPath2 and XQuery. > > > > Some like "The XPath 1.0 is ancestor of XPath 2.0, that is part of > XQuery. > > ..."

Re: PostgreSQL vs SQL/XML Standards

2018-12-30 Thread Chapman Flack
On 12/30/18 03:23, Pavel Stehule wrote: > I agree with more stronger detail description about difference between > XPath, XPath2 and XQuery. > > Some like "The XPath 1.0 is ancestor of XPath 2.0, that is part of XQuery. > ..." I'll be happy to work on some wording to help detail the differences.

Re: PostgreSQL vs SQL/XML Standards

2018-12-30 Thread Pavel Stehule
ne 30. 12. 2018 v 3:46 odesílatel Chapman Flack napsal: > On 11/12/18 04:58, Pavel Stehule wrote: > > It is assigned to January commitfest. > > When I build this patch against master (4203842), it builds, but breaks > make check. The diffs seem only incidental (loss of some error context > output

Re: PostgreSQL vs SQL/XML Standards

2018-12-29 Thread Chapman Flack
On 11/12/18 04:58, Pavel Stehule wrote: > It is assigned to January commitfest. When I build this patch against master (4203842), it builds, but breaks make check. The diffs seem only incidental (loss of some error context output), but there are no make check errors building 4203842 unmodified, so

Re: PostgreSQL vs SQL/XML Standards

2018-11-12 Thread Pavel Stehule
po 12. 11. 2018 v 6:58 odesílatel Markus Winand napsal: > > On 2018-11-9, at 05:07 , Pavel Stehule wrote: > > > > čt 8. 11. 2018 v 15:18 odesílatel Markus Winand > napsal: > >> >> > On 2018-11-6, at 15:23 , Pavel Stehule wrote: >> > >> > >> > >> > po 29. 10. 2018 v 11:45 odesílatel Pavel Stehu

Re: PostgreSQL vs SQL/XML Standards

2018-11-11 Thread Markus Winand
> On 2018-11-9, at 05:07 , Pavel Stehule wrote: > > > > čt 8. 11. 2018 v 15:18 odesílatel Markus Winand > napsal: > > > On 2018-11-6, at 15:23 , Pavel Stehule > > wrote: > > > > > > > > po 29. 10. 2018 v 11:45 odesílatel Pav

Re: PostgreSQL vs SQL/XML Standards

2018-11-08 Thread Pavel Stehule
čt 8. 11. 2018 v 15:18 odesílatel Markus Winand napsal: > > > On 2018-11-6, at 15:23 , Pavel Stehule wrote: > > > > > > > > po 29. 10. 2018 v 11:45 odesílatel Pavel Stehule < > pavel.steh...@gmail.com> napsal: > > > > > > po 29. 10. 2018 v 10:11 odesílatel Pavel Stehule < > pavel.steh...@gmail.c

Re: PostgreSQL vs SQL/XML Standards

2018-11-08 Thread Markus Winand
> On 2018-11-6, at 15:23 , Pavel Stehule wrote: > > > > po 29. 10. 2018 v 11:45 odesílatel Pavel Stehule > napsal: > > > po 29. 10. 2018 v 10:11 odesílatel Pavel Stehule > napsal: > Hi > > čt 25. 10. 2018 v 21:47 odesílatel Alvaro Herrera > napsal: > On 2018-Oct-25, Pavel Stehule wro

Re: PostgreSQL vs SQL/XML Standards

2018-11-06 Thread Pavel Stehule
po 29. 10. 2018 v 11:45 odesílatel Pavel Stehule napsal: > > > po 29. 10. 2018 v 10:11 odesílatel Pavel Stehule > napsal: > >> Hi >> >> čt 25. 10. 2018 v 21:47 odesílatel Alvaro Herrera < >> alvhe...@2ndquadrant.com> napsal: >> >>> On 2018-Oct-25, Pavel Stehule wrote: >>> >>> > I am thinking so

Re: PostgreSQL vs SQL/XML Standards

2018-10-29 Thread Chapman Flack
On 10/29/18 6:40 AM, Thomas Kellerer wrote: > That line seems to be valid - but you need to pass an XMLTYPE value, > not a VARCHAR > > https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=21cdf890a26e97fa8667b2d6a960bd33 Oh, of course! Thank you. I had forgotten pass the context item as explicitly an XM

Re: PostgreSQL vs SQL/XML Standards

2018-10-29 Thread Pavel Stehule
po 29. 10. 2018 v 10:11 odesílatel Pavel Stehule napsal: > Hi > > čt 25. 10. 2018 v 21:47 odesílatel Alvaro Herrera < > alvhe...@2ndquadrant.com> napsal: > >> On 2018-Oct-25, Pavel Stehule wrote: >> >> > I am thinking so I can fix some issues related to XMLTABLE. Please, >> send me >> > more exam

Re: PostgreSQL vs SQL/XML Standards

2018-10-29 Thread Thomas Kellerer
>> I have a access to too old 11.2 Oracle. There I had to modify query >> because there is not boolean type. I replaced bool by int, but I got a >> error >> ORA-19224:XPTY-004 .. expected node()*, got xs:string - it doesn't work >> with/without string() wrappings. >> >The problem is in last line -

Re: PostgreSQL vs SQL/XML Standards

2018-10-29 Thread Pavel Stehule
po 29. 10. 2018 v 11:05 odesílatel Pavel Stehule napsal: > > (It would not be exactly overloading, because of the special sugared >>> syntax known to the parser, but it could look like overloading, and be >>> intuitive to the user.) >>> >>> If you have convenient access to Oracle to check compati

Re: PostgreSQL vs SQL/XML Standards

2018-10-29 Thread Pavel Stehule
> (It would not be exactly overloading, because of the special sugared >> syntax known to the parser, but it could look like overloading, and be >> intuitive to the user.) >> >> If you have convenient access to Oracle to check compatibility, could you >> compare this query? >> >> SELECT * FROM XMLT

Re: PostgreSQL vs SQL/XML Standards

2018-10-29 Thread Pavel Stehule
Hi čt 25. 10. 2018 v 21:47 odesílatel Alvaro Herrera napsal: > On 2018-Oct-25, Pavel Stehule wrote: > > > I am thinking so I can fix some issues related to XMLTABLE. Please, send > me > > more examples and test cases. > > Please see Markus Winand's patch that I referenced upthread. > here is a

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Pavel Stehule
pá 26. 10. 2018 v 6:25 odesílatel Chapman Flack napsal: > On 10/25/18 23:16, Pavel Stehule wrote: > >> XMLTABLE would be the headache. Using the standard name for something > >> that ain't the standard function has not left any painless way that the > >> standard function could be added. OTOH, it

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Chapman Flack
On 10/25/18 23:16, Pavel Stehule wrote: >> XMLTABLE would be the headache. Using the standard name for something >> that ain't the standard function has not left any painless way that the >> standard function could be added. OTOH, it has only been in the wild >> since 10, so renaming it to somethin

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Chapman Flack
On 10/25/18 09:56, Alvaro Herrera wrote: > Would you review Markus Winand patch here? > https://postgr.es/m/8bdb0627-2105-4564-aa76-7849f028b...@winand.at > I think doing that would probably point out a couple of ways in which > our XMLTABLE implementation is non-conformant, and then fixes it :-) >

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Pavel Stehule
> > XMLTABLE would be the headache. Using the standard name for something > that ain't the standard function has not left any painless way that the > standard function could be added. OTOH, it has only been in the wild > since 10, so renaming it to something else (xpath_table?) will probably > be m

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Chapman Flack
On 10/25/18 11:15, Pavel Stehule wrote: > čt 25. 10. 2018 v 17:09 odesílatel Alvaro Herrera > napsal: >> Maybe the best way forward is to implement all the JSON functionality >> and remove the SQL/XML bits. > > It can be bigger compatibility break in Postgres history. SQL/XML functions > are wide

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Alvaro Herrera
On 2018-Oct-25, Pavel Stehule wrote: > I am thinking so I can fix some issues related to XMLTABLE. Please, send me > more examples and test cases. Please see Markus Winand's patch that I referenced upthread. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 2

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Pavel Stehule
Hi > But a roadmap that could lead to eventual availability of one of the > C/C++ implementations would be nice too. > Somebody should to do some work and write patch :/. Although libxml2 is after feature freeze - it is code widely used. The change of XML support should be safe, because there ca

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Jesper Pedersen
On 10/25/18 2:33 PM, Andrew Dunstan wrote: Yeah, very good point. xqilla/xerces-C appears to be widely available (Centos and ubuntu, at least). xqilla/xerces-c are in the Fedora/RHEL repo too. Best regards, Jesper

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Chapman Flack
On 10/25/18 11:08 AM, Alvaro Herrera wrote: > XQilla seems to depend on Xerces, and seems to have died in 2011. ¿Eh? The latest release, 2.3.4 [1], is dated 2018-07-03. It looks like the latest development has been happening on the xquilla_2_3 branch. Sometimes project "activity" statistics rely

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Andrew Dunstan
On 10/25/2018 11:23 AM, Andreas Karlsson wrote: On 10/25/2018 03:53 PM, Chapman Flack wrote: On 10/25/18 10:39 AM, Tom Lane wrote: I think getting out from under libxml2's idiosyncrasies and security lapses would be great, but is there a plausible alternative out there? Depends on whether

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Andreas Karlsson
On 10/25/2018 03:53 PM, Chapman Flack wrote: On 10/25/18 10:39 AM, Tom Lane wrote: I think getting out from under libxml2's idiosyncrasies and security lapses would be great, but is there a plausible alternative out there? Depends on whether anything in [1] sounds plausible. The libraries we

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Pavel Stehule
čt 25. 10. 2018 v 17:09 odesílatel Alvaro Herrera napsal: > On 2018-Oct-25, Chapman Flack wrote: > > > On 10/25/18 10:39 AM, Tom Lane wrote: > > > I think getting out from under libxml2's idiosyncrasies and security > > > lapses would be great, but is there a plausible alternative out there? > >

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Alvaro Herrera
On 2018-Oct-25, Chapman Flack wrote: > On 10/25/18 10:39 AM, Tom Lane wrote: > > I think getting out from under libxml2's idiosyncrasies and security > > lapses would be great, but is there a plausible alternative out there? > > Depends on whether anything in [1] sounds plausible. > > [1]: > htt

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Chapman Flack
On 10/25/18 10:39 AM, Tom Lane wrote: > I think getting out from under libxml2's idiosyncrasies and security > lapses would be great, but is there a plausible alternative out there? Depends on whether anything in [1] sounds plausible. -Chap [1]: https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQ

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Tom Lane
Alvaro Herrera writes: > On 2018-Oct-24, Chapman Flack wrote: >> https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL/XML_Standards > Wow, that's ... overwhelming. (I do wonder if we should stop relying on > libxml2 and instead look for something supporting XQuery). I think getting out from under

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Alvaro Herrera
On 2018-Oct-24, Chapman Flack wrote: > Inspired by the wiki page on PostgreSQL vs SQL Standard in general, > I have made another wiki page specifically about $subject. I hope > this was not presumptuous, and invite review / comment. I have not > linked to it from any other page yet. > > https://w