Thread: xml in ruleutils

xml in ruleutils

From
andrzej barszcz
Date:
Hi,

Well, best to write this way:

Goal : query splitted to base elements
Result : xml response from server
Client : select pg_reparse_query(<query>);
Target: 8.4 version

How : modification of ruleutiles.c
Not done : UNION etc.
Not done : as builtin function, I don't know how to do it )))
Tested : partly


examples :

query : ( not meaningful by the way )

pzty - View on table X
"wartość zakupu" - from View of table Y
"nazwa dostawcy" - from Table Z

select public.pg_reparse_query($$with xxx as (select * from pzty) select
ctid,upper("nazwa dostawcy") from xxx where typ_dok='PZ' or typ_dok='WZ'
and "nazwa dostawcy" = 'A' and "wartość zakupu" = 100 order by "nazwa
dostawcy" desc $$);

second example:

select public.pg_reparse_query($$select ctid,upper("nazwa dostawcy")
from pzty where typ_dok='PZ' or typ_dok='WZ' and "nazwa dostawcy" = 'A'
and "wartość zakupu" = 100 order by "nazwa dostawcy" desc $$);


Does it make sense ????


If you are interested in this solution send me email please.


best regards
Andrzej Barszcz





Attachment

Re: xml in ruleutils

From
Peter Eisentraut
Date:
On Saturday 11 July 2009 17:37:03 andrzej barszcz wrote:
> Well, best to write this way:
>
> Goal : query splitted to base elements
> Result : xml response from server
> Client : select pg_reparse_query(<query>);
> Target: 8.4 version
>
> How : modification of ruleutiles.c
> Not done : UNION etc.
> Not done : as builtin function, I don't know how to do it )))
> Tested : partly

> Does it make sense ????

I think the lack of response indicates that to most people it doesn't.  Maybe 
you can try to explain it a bit differently.