Skip site navigation (1) Skip section navigation (2)

Re: review: xml_is_well_formed

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Mike Fowler <mike(at)mlfowler(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: review: xml_is_well_formed
Date: 2010-07-31 17:40:36
Message-ID: AANLkTinHhCZR2RqiDrMd=eqdfw2eHVZ=+Q2vdYiLVP=5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sat, Jul 31, 2010 at 8:10 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> 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.

I think the point of this function is to determine whether a cast to
xml will throw an error.  The behavior should probably match exactly
whatever test would be applied there.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2010-07-31 19:26:56
Subject: Re: ANALYZE versus expression indexes with nondefault opckeytype
Previous:From: Robert HaasDate: 2010-07-31 17:32:13
Subject: Re: ANALYZE versus expression indexes with nondefault opckeytype

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group