xml in ruleutils

Started by andrzej barszczover 16 years ago2 messages
#1andrzej barszcz
abusi@it-net.pl
2 attachment(s)

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

Attachments:

query.xmlapplication/xml; name=query.xmlDownload
query_without_with.xmlapplication/xml; name=query_without_with.xmlDownload
#2Peter Eisentraut
peter_e@gmx.net
In reply to: andrzej barszcz (#1)
Re: xml in ruleutils

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.