X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 16CAB3134FA for ; Tue, 10 Jun 2003 04:43:16 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 22158-08 for ; Tue, 10 Jun 2003 01:43:04 -0300 (ADT) Received: from tomts11-srv.bellnexxia.net (tomts11.bellnexxia.net [209.226.175.55]) by svr1.postgresql.org (Postfix) with ESMTP id 8C3CC31159C for ; Mon, 9 Jun 2003 14:13:40 +0000 (GMT) Received: from acer.sympatico.ca ([65.93.93.151]) by tomts11-srv.bellnexxia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030609141339.ITVH483.tomts11-srv.bellnexxia.net@acer.sympatico.ca>; Mon, 9 Jun 2003 10:13:39 -0400 Message-Id: <5.2.1.1.0.20030609100829.026126c0@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Mon, 09 Jun 2003 10:13:01 -0400 To: Damien Dougan , pgsql-sql@postgresql.org From: Frank Bax Subject: Re: Creating Views with Column Names based on Distinct In-Reply-To: <200306061459.40974.damien.dougan@mobilecohesion.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200306/70 X-Sequence-Number: 13828 At 10:59 AM 6/6/03, Damien Dougan wrote: >I was wondering if it is possible to create a table view based on a table >which is effectively an "attribute list". > >For example, suppose I have two tables: > >CREATE TABLE user >( > userid integer, > username character varying, > userpassword character varying, > startdate date >); > >CREATE TABLE userdetail >( > userid integer, > attributename character varying, > attributevalue character varying >); > >Now I want to make a public view of the user, which would have all of the >defined fields in user, and all of the defined attributes across userdetail. I'll think you'll find what you're looking for if you search the archives of this mailing list for 'crosstab'.