On 10 July 2010 14:12, Mike Fowler m...@mlfowler.com wrote:
Robert Haas wrote:
On Fri, Jul 9, 2010 at 4:06 PM, Peter Eisentraut pete...@gmx.net wrote:
On ons, 2010-07-07 at 16:37 +0100, Mike Fowler wrote:
Here's the patch to add the 'xml_is_well_formed' function.
I suppose we should
Thom Brown wrote:
Would a test for mismatched or undefined namespaces be necessary?
For example:
Mismatched namespace:
pg:foo xmlns:pg=http://postgresql.org/stuff;bar/my:foo
Undefined namespace when used in conjunction with IS DOCUMENT:
pg:foo xmlns:my=http://postgresql.org/stuff;bar/pg:foo
On 12 July 2010 13:07, Mike Fowler m...@mlfowler.com wrote:
Thom Brown wrote:
Just wondering about that semi-colon after the namespace definition.
Thom
The semi-colon is not supposed to be there, and I'm not sure where it's come
from. With Thunderbird I see the email with my patch as an
Robert Haas wrote:
On Fri, Jul 9, 2010 at 4:06 PM, Peter Eisentraut pete...@gmx.net wrote:
On ons, 2010-07-07 at 16:37 +0100, Mike Fowler wrote:
Here's the patch to add the 'xml_is_well_formed' function.
I suppose we should remove the function from contrib/xml2 at the same
On ons, 2010-07-07 at 16:37 +0100, Mike Fowler wrote:
Here's the patch to add the 'xml_is_well_formed' function.
I suppose we should remove the function from contrib/xml2 at the same
time.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your
On Fri, Jul 9, 2010 at 4:06 PM, Peter Eisentraut pete...@gmx.net wrote:
On ons, 2010-07-07 at 16:37 +0100, Mike Fowler wrote:
Here's the patch to add the 'xml_is_well_formed' function.
I suppose we should remove the function from contrib/xml2 at the same
time.
Yep.
--
Robert Haas
Peter Eisentraut wrote:
On lör, 2010-07-03 at 09:26 +0100, Mike Fowler wrote:
What I will do
instead is implement the xml_is_well_formed function and get a patch
out in the next day or two.
That sounds very useful.
Here's the patch to add the 'xml_is_well_formed' function.
Quoting Peter Eisentraut pete...@gmx.net:
On fre, 2010-07-02 at 14:07 +0100, Mike Fowler wrote:
So if IS CONTENT were
to be implemented, to determine that you have something that is
malformed
But that's not what IS CONTENT does. Content still needs to be
well-formed.
What I was hoping to
On lör, 2010-07-03 at 09:26 +0100, Mike Fowler wrote:
What I will do
instead is implement the xml_is_well_formed function and get a patch
out in the next day or two.
That sounds very useful.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your
Quoting Robert Haas robertmh...@gmail.com:
I think the point if IS DOCUMENT is to distinguish a document:
foosome stuffbar/baz//foo
from a document fragment:
bar/baz/
A document is allowed only one toplevel tag.
It'd be nice, I think, to have a function that tells you whether
something is
On fre, 2010-07-02 at 14:07 +0100, Mike Fowler wrote:
So if IS CONTENT were
to be implemented, to determine that you have something that is
malformed
But that's not what IS CONTENT does. Content still needs to be
well-formed.
--
Sent via pgsql-hackers mailing list
Quoting Mike Fowler m...@mlfowler.com:
Should the IS DOCUMENT predicate support this? At the moment you get
the following:
template1=# SELECT
'townstownBidford-on-Avon/towntownCwmbran/towntownBristol/town/towns'
IS
DOCUMENT;
?column?
--
t
(1 row)
template1=# SELECT
On Thu, Jul 1, 2010 at 12:25 PM, Mike Fowler m...@mlfowler.com wrote:
Quoting Mike Fowler m...@mlfowler.com:
Should the IS DOCUMENT predicate support this? At the moment you get
the following:
template1=# SELECT
'townstownBidford-on-Avon/towntownCwmbran/towntownBristol/town/towns'
IS
Excerpts from David Fetter's message of lun jun 28 12:00:47 -0400 2010:
While tracking this down, I didn't see a way to get SQLSTATE or the
corresponding condition name via psql. Is this an oversight? A bug,
perhaps?
IIRC
\pset VERBOSITY verbose
to get the SQLSTATE.
I don't think you can
We need to make extensive use of the 'xml_is_well_formed' function provided
by the XML2 module.
Yet the documentation says that the xml2 module will be deprecated since
XML syntax checking and XPath queries
is covered by the XML-related functionality based on the SQL/XML standard in
the core
On Mon, Jun 28, 2010 at 11:08 AM, Mike Berrow mber...@gmail.com wrote:
We need to make extensive use of the 'xml_is_well_formed' function provided
by the XML2 module.
Yet the documentation says that the xml2 module will be deprecated since
XML syntax checking and XPath queries
is covered by
On Mon, Jun 28, 2010 at 08:08:53AM -0700, Mike Berrow wrote:
We need to make extensive use of the 'xml_is_well_formed' function provided
by the XML2 module.
Yet the documentation says that the xml2 module will be deprecated since
XML syntax checking and XPath queries
is covered by the
On Mon, Jun 28, 2010 at 11:42 AM, Mike Rylander mrylan...@gmail.com wrote:
You could do something like this (untested):
CREATE OR REPLACE FUNCTION my_xml_is_valid ( x TEXT ) RETURNS BOOL AS $$
BEGIN
PERFORM XMLPARSE( DOCUMENT x::XML );
RETURN TRUE;
EXCEPTION WHEN OTHERS THEN
RETURN
Robert Haas wrote:
On Mon, Jun 28, 2010 at 11:42 AM, Mike Rylander mrylan...@gmail.com wrote:
You could do something like this (untested):
CREATE OR REPLACE FUNCTION my_xml_is_valid ( x TEXT ) RETURNS BOOL AS $$
BEGIN
PERFORM XMLPARSE( DOCUMENT x::XML );
RETURN TRUE;
EXCEPTION WHEN OTHERS
We need to make extensive use of the 'xml_is_well_formed' function provided
by the XML2 module.
Yet the documentation says that the xml2 module will be deprecated since
XML syntax checking and XPath queries
is covered by the XML-related functionality based on the SQL/XML standard in
the core
On Mon, Jun 28, 2010 at 11:03 AM, Mike Berrow mber...@gmail.com wrote:
Is there some way to use the new, core XML functionality to simply return a
truth value
in the way that we need?.
Have you tried using a wrapper function like the one suggested
independently by Mike Rylander and David
Yes, I went ahead and tried the original suggestion.
Here is what the added function went in as:
CREATE OR REPLACE FUNCTION xml_is_ok(x text)
RETURNS boolean AS
$BODY$
BEGIN
PERFORM XMLPARSE( DOCUMENT x::XML );
RETURN TRUE;
EXCEPTION WHEN OTHERS THEN
RETURN FALSE;
END;
$BODY$
LANGUAGE
22 matches
Mail list logo