Am Dienstag, 10. April 2007 14:01 schrieb Nikolay Samokhvalov:
> Here is new version that adds following changes:
> 4. Function is now strict, per discussion.
> 5. Return empty array in case when XPath expression detects nothing
> (previously, NULL was returned in such case), per discussion.
>
Thanks, added to queue.
---
Nikolay Samokhvalov wrote:
> What's with this patch?
> I do not see it in unapplied patches list, neither it was commited...
> What we have now in CVS is not a good thing.
>
> On 4/10/07, Nikolay
Your patch has been added to the PostgreSQL unapplied patches list at:
http://momjian.postgresql.org/cgi-bin/pgpatches
It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.
---
Ni
What's with this patch?
I do not see it in unapplied patches list, neither it was commited...
What we have now in CVS is not a good thing.
On 4/10/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
Here is new version that adds following changes:
4. Function is now strict, per discussion.
5.
It's also worth to take care of the very last lines of XML functions
doc (http://momjian.us/main/writings/pgsql/sgml/functions-xml.html):
"XML to SQL Mapping
This involves converting XML data to and from relational
structures. PostgreSQL has no internal support for such mapping, and
relies on
Am Dienstag, 10. April 2007 15:17 schrieb Andrew Dunstan:
> Nikolay Samokhvalov wrote:
> > 6. (bugfix) Work with fragments with prologue: select xpath('/a',
> > ''); // now XML datum is always wrapped
> > with dummy ..., XML prologue simply goes away (if any).
>
> Is that legal XML? I though only
Nikolay Samokhvalov wrote:
6. (bugfix) Work with fragments with prologue: select xpath('/a',
''); // now XML datum is always wrapped
with dummy ..., XML prologue simply goes away (if any).
Is that legal XML? I though only documents could have prologs.
cheers
andrew
-
Here is new version that adds following changes:
4. Function is now strict, per discussion.
5. Return empty array in case when XPath expression detects nothing
(previously, NULL was returned in such case), per discussion.
6. (bugfix) Work with fragments with prologue: select xpath('/a',
''); //
I've realized that Peter's criticism (concerning comparing beginning
of datum with "".
I'll propose a modification of the patch as long as fixes for NULLs as
input and output values very soon (in a day or so).
On 4/4/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
The patch attached contains
On 4/4/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
So, choosing between two inefficient approaches:
1. mine, which in some cases use dummy element wrapping, that we could
escape;
2. proposed by you, which leads to +1 parsing.
... I'd definitely choose the first one.
I'd make it a bi
Am Mittwoch, 4. April 2007 15:20 schrieb Nikolay Samokhvalov:
> > To determine if an XML datum is a document, call xml_is_document(). The
> > implementation of that function is probably not the best possible one,
> > but what the xpath() code does it totally wrong nevertheless.
>
> You are proposi
Am Mittwoch, 4. April 2007 14:43 schrieb Nikolay Samokhvalov:
> > Why do we even need to support xpath on fragments?
>
> Why not? I find it useful and convenient.
Well, rather than inventing bogus root wrapper elements, why not let users
call xmlelement() to produce the wrapper element themselves
Am Mittwoch, 4. April 2007 14:42 schrieb Nikolay Samokhvalov:
> > Why is the function not strict?
>
> Because in case of 3rd argument (NS mappings) being NULL, we shouldn't
> return NULL immediately:
If the namespace mapping is NULL then it is unknown, and therefore the result
of the XPath expres
Am Mittwoch, 4. April 2007 14:42 schrieb Nikolay Samokhvalov:
> Maybe it's worth to start keeping additional information in xml datum (i.e.
> bit IS_DOCUMENT and, what is more important for xpath() function, a bit
> indicating that XML value has only one root and can be considered as a tree
> => th
Nikolay Samokhvalov wrote:
> I apologize for it. I was extremely busy that week.
> Fixes will follow ASAP, I'm working on it. 2 days are enough, it's good
> deadline for me.
> Sorry for delay.
Yes, that is fine. Thanks.
---
Nikolay Samokhvalov wrote:
> On 3/22/07, Peter Eisentraut <[EMAIL PROTECTED]> wrote:
> > Bruce Momjian wrote:
> > > Patch applied.
> >
> > This code seems to think that if an xml datum starts with " > document. That is completely bogus.
>
> Agreed. I'll fix it.
Nikolay, it has been a week, and I
Nikolay Samokhvalov wrote:
> Also, maybe someone can suggest better approach for passing namespace
> bindings (more convenient than ARRAY[ARRAY[...], ARRAY[...]])?
Your code assumes
ARRAY[ARRAY['myns', 'myns2'], ARRAY['http://example.com',
'http://example2.com']]
Shouldn't it be
ARRAY[ARRAY['m
Andrew Dunstan wrote:
> Would it be better to use some more unlikely name for the dummy root
> element used to process fragments than ?
Why do we even need to support xpath on fragments?
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
---(end of broadcast)-
Nikolay Samokhvalov wrote:
> On 3/4/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
> > I'll fix these issues and extend the patch with resgression tests
> > and docs for xpath_array(). I'll resubmit it very soon.
>
> Here is a new version of the patch. I didn't change any part of docs
> yet. Si
Bruce Momjian wrote:
> Patch applied.
This code seems to think that if an xml datum starts with "http://developer.postgresql.org/~petere/
---(end of broadcast)---
TIP 6: explain analyze is your friend
Nikolay Samokhvalov wrote:
> Here is a new version of the patch. I didn't change any part of docs
> yet. Since there were no objections I've changed the name of the
> function to xmlpath().
I didn't see any discussion about changing the name to xmlpath. Seeing
that the function implements xpath,
Applying newest version of this patch now; still needs documentation.
---
Nikolay Samokhvalov wrote:
> On 3/5/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
> > On 3/4/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
Patch applied.
Please provide a documentation addition. Thanks.
---
Nikolay Samokhvalov wrote:
> On 3/4/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
> > I'll fix these issues and extend the patch with resgression te
On 3/5/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
On 3/4/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
> I'll fix these issues and extend the patch with resgression tests and
> docs for xpath_array(). I'll resubmit it very soon.
Here is a new version of the patch. I didn't change an
Nikolay Samokhvalov wrote:
On 3/17/07, Andrew Dunstan <[EMAIL PROTECTED]> wrote:
In principle I am in favor of the patch.
Would it be better to use some more unlikely name for the dummy root
element used to process fragments than ?
Perhaps even something in a special namespace?
I did thi
Nikolay Samokhvalov wrote:
What about it? W/o this not large patch XML functionality in 8.3 will
be weak...
Will it be accepted?
In principle I am in favor of the patch.
Would it be better to use some more unlikely name for the dummy root
element used to process fragments than ?
Perhap
What about it? W/o this not large patch XML functionality in 8.3 will be weak...
Will it be accepted?
On 3/5/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
On 3/4/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
> I'll fix these issues and extend the patch with resgression tests and
> docs
On 3/3/07, Bruce Momjian <[EMAIL PROTECTED]> wrote:
I tried this patch bug found this regression failure:
-- Considering only built-in procs (prolang = 12), look for multiple uses
-- of the same internal function (ie, matching prosrc fields). It's OK to
-- have several entries with diffe
On 3/4/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
I'll fix these issues and extend the patch with resgression tests and
docs for xpath_array(). I'll resubmit it very soon.
Here is a new version of the patch. I didn't change any part of docs yet.
Since there were no objections I've chang
I tried this patch bug found this regression failure:
-- Considering only built-in procs (prolang = 12), look for multiple uses
-- of the same internal function (ie, matching prosrc fields). It's OK to
-- have several entries with different pronames for the same internal
function,
-- bu
Your patch has been added to the PostgreSQL unapplied patches list at:
http://momjian.postgresql.org/cgi-bin/pgpatches
It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.
---
Ni
As a result of discussion with Peter, I provide modified patch for
xpath_array() with namespaces support.
The signature is:
_xml xpath_array(text xpathQuery, xml xmlValue[, _text namespacesBindings])
The third argument is 2-dimensional array defining bindings for
namespaces. Simple examples:
x
32 matches
Mail list logo