BUG #5285: contrib\xml2 package's xpath_table function - Mailing list pgsql-bugs

From heyong
Subject BUG #5285: contrib\xml2 package's xpath_table function
Date
Msg-id 201001181013.o0IADVnc005446@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5285: contrib\xml2 package's xpath_table function  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5285
Logged by:          heyong
Email address:      hewy126@126.com
PostgreSQL version: postgresql-8.3
Operating system:   solarias
Description:        contrib\xml2 package's xpath_table function
Details:

<FEATURELIST>
        <FEATURE id="1" name="发货期限" type="enum" value="10" fid="874"
unit="天内发货" isneeded="N" fieldflag="sendlimit" />
        <FEATURE id="2" name="类别" type="enum" value="洗衣房设备"
fid="1835" isneeded="Y" />
        <FEATURE id="3" name="供应商类型" type="enum" value="代理商"
fid="4441" isneeded="Y" fieldflag="providertype" />
</FEATURELIST>

when I run sql:
SELECT * FROM
xpath_table('id'
            ,'member_define_properties'
            ,'aquery.hy_test1'
            ,'/FEATURELIST/FEATURE/@fid
            |/FEATURELIST/FEATURE/@name
            |/FEATURELIST/FEATURE/@value
            |/FEATURELIST/FEATURE/@fieldflag
            '
            ,'1=1 and id=155015037'
            )
AS t(   offer_id        NUMERIC
        ,fid            text
        ,name           text
        ,VALUE          text
        ,fieldflag      text
        )

the result is

 offer_id  | fid  |    name    |   value    |  fieldflag
-----------+------+------------+------------+--------------
 155015037 | 874  | 发货期限   | 10         | sendlimit
 155015037 | 1835 | 类别       | 洗衣房设备 | providertype
 155015037 | 4441 | 供应商类型 | 代理商     |


which fieldflag's values is err

pgsql-bugs by date:

Previous
From: "azuneko"
Date:
Subject: BUG #5284: Postgres CPU 100% and worker took too long to start; cancelled... Systemdown
Next
From: "G.Schaeffler"
Date:
Subject: BUG #5286: pgAdmin will put table and field names in apostrophes which then must be used for accessing them