Re: review: xml_is_well_formed

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Mike Fowler <mike(at)mlfowler(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: review: xml_is_well_formed
Date: 2010-08-02 06:46:13
Message-ID: AANLkTikkFTd7Z8Kt5vdALOK_=t2w1ACaj_6ufsiueVKW@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/8/2 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> 2010/7/31 Robert Haas <robertmhaas(at)gmail(dot)com>:
>> 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.
>
> I agree with this idea - so I am able to do:
>
> postgres=# select 'xxx'::xml;
>  xml
> -----
>  xxx
> (1 row)
>
> I have not any suggestions now - so I'll change flag to "ready to commit"

sorry - contrib module should be a fixed

patch attached

>
> Regards
>
> Pavel Stehule
>
>>
>> --
>> Robert Haas
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise Postgres Company
>>
>

Attachment Content-Type Size
xml2contrib.patch text/x-patch 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hardik Belani 2010-08-02 07:20:18 Postgres as Historian
Previous Message Jaime Casanova 2010-08-02 06:43:40 Re: Per-column collation, proof of concept