From: | fangfang liu <yisuoyanyu888(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: add xml support function |
Date: | 2009-12-31 11:22:26 |
Message-ID: | 30acb4640912310322v301b9618p448b03429cbaec04@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
IS_XMLQUERY is added in primenodes.h
but the parser can not find xmlquery, the makeXmlExpr is not called at all.
thanks
2009/12/31 Robert Haas <robertmhaas(at)gmail(dot)com>
> On Thu, Dec 31, 2009 at 3:33 AM, fangfang liu <yisuoyanyu888(at)gmail(dot)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.
>
> How about CREATE OR REPLACE FUNCTION xmlquery(...) ?
>
> 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2009-12-31 11:25:19 | Re: Hot Standy introduced problem with query cancel behavior |
Previous Message | Simon Riggs | 2009-12-31 11:10:35 | Re: Cancelling idle in transaction state |