X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9F4BA3A5FB1 for ; Fri, 28 Jan 2005 18:15:58 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78306-04 for ; Fri, 28 Jan 2005 18:15:52 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198]) by svr1.postgresql.org (Postfix) with ESMTP id B110E3A60E5 for ; Fri, 28 Jan 2005 18:15:45 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 40so363171wri for ; Fri, 28 Jan 2005 10:15:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=CJKgCS2j4wct4q1tL1cSjyyFnahdQX0qznTtM7YPVCCEHHaZHlZSy6Gy/C2TTmSVEsk5GKma9rq4s1hYkceiTcvpguRCBo4yCpjrZ482NjOFvCjoOGw/ERkE2zOdCslOmJUYdx3UvoUNhJL6/91mFqIIBc0mD3KAagWpBYCmzTE= Received: by 10.54.59.30 with SMTP id h30mr361720wra; Fri, 28 Jan 2005 10:15:44 -0800 (PST) Received: by 10.54.20.47 with HTTP; Fri, 28 Jan 2005 10:15:44 -0800 (PST) Message-ID: <1dc7f0e3050128101569232b5b@mail.gmail.com> Date: Fri, 28 Jan 2005 13:15:44 -0500 From: Alexandre Leclerc Reply-To: Alexandre Leclerc To: Joe Conway Subject: Re: Flattening a kind of 'dynamic' table Cc: Dawid Kuroczko , PERFORM In-Reply-To: <41FA6993.5000702@joeconway.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <1dc7f0e305012707234159cfc8@mail.gmail.com> <758d5e7f050127082755f9af12@mail.gmail.com> <1dc7f0e30501270943683ced12@mail.gmail.com> <758d5e7f050128000716f28a59@mail.gmail.com> <1dc7f0e305012806254e8540f4@mail.gmail.com> <41FA6993.5000702@joeconway.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200501/588 X-Sequence-Number: 10278 On Fri, 28 Jan 2005 08:34:27 -0800, Joe Conway wrote: > Alexandre Leclerc wrote: > >>>>>Here a normal listing of design.product_department_time: > >>>>> product_id | department_id | req_time > >>>>>------------+---------------+---------- > >>>>> 906 | A | 3000 > >>>>> 906 | C | 3000 > >>>>> 906 | D | 1935 > >>>>> 907 | A | 1500 > >>>>> 907 | C | 1500 > >>>>> 907 | D | 4575 > >>>>> 924 | A | 6000 > >>>>> 924 | C | 1575 > > Sorry for jumping in on this thread so late -- I haven't been able to > keep up with the lists lately. > > If I understand what you want correctly, you should be able to use > crosstab from contrib/tablefunc: I'm a little bit confused on how to install this contirb. I know my contrib package is installed, but I don't know how to make it work in postgresql. (Using 7.4.5-1mdk on Mandrake Linux.) -- Alexandre Leclerc