Re: review: xml_is_well_formed

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: Mike Fowler <mike@mlfowler.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-07-31T12:10:33Z
Lists: pgsql-hackers
On fre, 2010-07-30 at 12:50 +0100, Mike Fowler wrote:
> > * xml_is_well_formed returns true for simple text
> >
> > postgres=# SELECT xml_is_well_formed('ssss');
> >   xml_is_well_formed
> > --------------------
> >   t
> > (1 row)
> >
> > it is probably wrong result - is it ok??
> >    
> 
> Yes this is OK, pure text is valid XML content.

Are you speaking of XML content fragments that SQL/XML defines?

Well-formedness should probably only allow XML documents.