Skip site navigation (1) Skip section navigation (2)

Re: Concatenating several rows with a semicolon

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Concatenating several rows with a semicolon
Date: 2010-12-28 21:31:15
Message-ID: AANLkTi=Q=x_EgtYhhU0Lca=QV35WcpDWgHnNbx_x2Eeg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
2010/12/29 Alexander Farber <alexander(dot)farber(at)gmail(dot)com>

> Hello Bill and others,
>
> I don't agree about yw being a bad thing
> since I have weekly raings in my app,
> but your XML suggestion -
>
> On Tue, Dec 28, 2010 at 9:29 PM, Bill Moran <wmoran(at)potentialtech(dot)com>
> wrote:
> >
> > If there are multiple entries for pref_money, then each one should be
> > a container inside user, i.e.:
> >
> > <user id="bla bla bla ...>
> >  <pref_money date="2010-52" money="760" />
> >  <pref_money date="2010-51" money="3848" />
> >  ... etc ...
> > </user>
>
Well, generally storing data in attributes should be avoided:

<user id="id">
  <pref_money>
    <date>...</date>
    <money>...</money>
  </pref_money>
  ...
</user>
is a better.

>
> is a very good point, thanks!
>
> Alex
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
// Dmitriy.

In response to

Responses

pgsql-general by date

Next:From: Alexander FarberDate: 2010-12-28 22:07:17
Subject: Re: Concatenating several rows with a semicolon
Previous:From: Alexander FarberDate: 2010-12-28 21:26:03
Subject: Re: Concatenating several rows with a semicolon

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group