Re: BUG #5285: contrib\xml2 package's xpath_table function
От | Robert Haas |
---|---|
Тема | Re: BUG #5285: contrib\xml2 package's xpath_table function |
Дата | |
Msg-id | 603c8f071001201959n236a5d7em2d5f3c2dc3dcf070@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #5285: contrib\xml2 package's xpath_table function ("heyong" <hewy126@126.com>) |
Список | pgsql-bugs |
On Mon, Jan 18, 2010 at 5:13 AM, heyong <hewy126@126.com> wrote: > > 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=3D"1" name=3D"=B7=A2=BB=F5=C6=DA=CF=DE" type=3D"enum" = value=3D"10" fid=3D"874" > unit=3D"=CC=EC=C4=DA=B7=A2=BB=F5" isneeded=3D"N" fieldflag=3D"sendlimit" = /> > <FEATURE id=3D"2" name=3D"=C0=E0=B1=F0" type=3D"enum" value=3D"=CF= =B4=D2=C2=B7=BF=C9=E8=B1=B8" > fid=3D"1835" isneeded=3D"Y" /> > <FEATURE id=3D"3" name=3D"=B9=A9=D3=A6=C9=CC=C0=E0=D0=CD" type=3D"= enum" value=3D"=B4=FA=C0=ED=C9=CC" > fid=3D"4441" isneeded=3D"Y" fieldflag=3D"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=3D1 and id=3D155015037' > ) > AS t( offer_id NUMERIC > ,fid text > ,name text > ,VALUE text > ,fieldflag text > ) > > the result is > > offer_id | fid | name | value | fieldflag > -----------+------+------------+------------+-------------- > 155015037 | 874 | =B7=A2=BB=F5=C6=DA=CF=DE | 10 | sendlimit > 155015037 | 1835 | =C0=E0=B1=F0 | =CF=B4=D2=C2=B7=BF=C9=E8=B1=B8 |= providertype > 155015037 | 4441 | =B9=A9=D3=A6=C9=CC=C0=E0=D0=CD | =B4=FA=C0=ED=C9=CC = | > > > which fieldflag's values is err Please attach (as an attachment, not in the body of the email) the complete pg_dump output of a test database that can be used to reproduce this problem. If possible, a test case that can be reproduced using only ASCII characters would be helpful. By the way, I notice that the 8.4 documentation for contrib/xml2 states that it will be removed in 8.4. Apparently, we didn't. But I guess maybe we should go ahead and do that. I crashed the server several times while attempting to reproduce the above bug, which makes me feel like having this code around is not a good thing. $ psql Line style is old-ascii. psql (8.5devel) Type "help" for help. rhaas=3D# load 'pgxml'; LOAD rhaas=3D# \i pgxml.sql SET CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION psql:pgxml.sql:79: ERROR: could not find function "xslt_process" in file "/home/rhaas/project/lib/postgresql/pgxml.so" psql:pgxml.sql:86: ERROR: could not find function "xslt_process" in file "/home/rhaas/project/lib/postgresql/pgxml.so" rhaas=3D# create table articles (article_id integer, article_xml xml, date_entered date); CREATE TABLE rhaas=3D# insert into articles (article_id, article_xml, date_entered) values (2, '<article><author>test</author><pages>37</pages></article>', now()); INSERT 0 1 rhaas=3D# SELECT * FROM xpath_table('article_id', 'article_xml', 'articles', '/article/author|/article/pages|/article/title', 'date_entered > ''2003-01-01'' ') AS t(article_id integer, author text, page_count integer, title text); server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. ...Robert
В списке pgsql-bugs по дате отправления:
Предыдущее
От: Heikki LinnakangasДата:
Сообщение: Re: BUG #5290: Simple loop with insert into and check to avoid duplicate values fails
Следующее
От: Heikki LinnakangasДата:
Сообщение: Re: BUG #5290: Simple loop with insert into and check to avoid duplicate values fails