2010/12/29 Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
> Hello Dmitriy,
> I think this combination of attributes and children:
> >> >> > <user id="bla bla bla ...>
> >> >> > <pref_money date="2010-52" money="760" />
> >> >> > <pref_money date="2010-51" money="3848" />
> >> >> > ... etc ...
> >> >> > </user>
> will be a good balance between size and my original problem
> (combining user data and their stats in 1 chunk of information).
> And I don't use JSON, because it is not natively
> supported by Flex/Flash and my app is in Flex (here is its pic:
> >> > Well, generally storing data in attributes should be avoided:
> You haven't backuped your statement by any arguments
:-) You have asked how to aggregate string -- I've answered you how
to do it by one statement without needs to write any of PL/pgSQL code.
So the string aggregation problem is solved. ;-)
This list is not correct place to discuss XML. My only argument is a
common sense. You don't make difference between the data and attributes.
The data of <pref_money> is obviously money amount and the date is
obviously its attribute:
PS. If you don't want to follow this way you can "reduce" the size of XML
transfer by placing all the data in one tag:
<user id="id" prefmoneydate="2010-.." prefmoneyvalue="..."/>
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
In response to
pgsql-general by date
|Next:||From: Guillaume Lelarge||Date: 2010-12-29 07:04:06|
|Subject: Re: B-tree index with sorting question|
|Previous:||From: Alan Hodgson||Date: 2010-12-29 06:54:30|
|Subject: Re: Restore problem|