Re: add xml support function
От | fangfang liu |
---|---|
Тема | Re: add xml support function |
Дата | |
Msg-id | 30acb4640912310322v301b9618p448b03429cbaec04@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: add xml support function (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: add xml support function
Re: add xml support function |
Список | pgsql-hackers |
Actually, I expect the function looks like xmlquery(xmlcontent,xquery) and return the query result.
So xmlconcat(xml1,xml2) become a good example to study.
starting from gram.y, I try to make parser to call xmlquery,the following is the result of diff:
diff gram.y c:\new_gram.y
449c449
< XMLPI XMLQUERY XMLROOT XMLSERIALIZE
---
> XMLPI XMLROOT XMLSERIALIZE
8270,8273d8269
< | XMLQUERY '(' expr_list ')'
< {
< $$ = makeXmlExpr(IS_XMLQUERY, NULL, NIL,$3);
< }
8287d8282
<
9296d9290
< | XMLQUERY
449c449
< XMLPI XMLQUERY XMLROOT XMLSERIALIZE
---
> XMLPI XMLROOT XMLSERIALIZE
8270,8273d8269
< | XMLQUERY '(' expr_list ')'
< {
< $$ = makeXmlExpr(IS_XMLQUERY, NULL, NIL,$3);
< }
8287d8282
<
9296d9290
< | XMLQUERY
IS_XMLQUERY is added in primenodes.h
but the parser can not find xmlquery, the makeXmlExpr is not called at all.
thanks
thanks
2009/12/31 Robert Haas <robertmhaas@gmail.com>
How about CREATE OR REPLACE FUNCTION xmlquery(...) ?On Thu, Dec 31, 2009 at 3:33 AM, fangfang liu <yisuoyanyu888@gmail.com> wrote:
> Hi - Does anyone know how to add a xml support function into postgresql?
>
> I want to add a function named xmlquery into postgresql.
>
> I modify gram.y by adding xmlquery relatedcode wherever other xml support
> functions appear.
> but the parser can not find xmlquery, the makeXmlExpr is not called at all.
If that doesn't meet your needs, you'll need to explain what you're
trying to do - and probably provide a patch showing what you've tried
so far.
...Robert
В списке pgsql-hackers по дате отправления: