pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Bax <fbax@sympatico.ca>
To: Damien Dougan <damien.dougan@mobilecohesion.com>
To: pgsql-sql@postgresql.org
Subject: Re: Creating Views with Column Names based on Distinct
Date: Mon, 09 Jun 2003 10:13:01 -0400
Message-ID: <5.2.1.1.0.20030609100829.026126c0@pop6.sympatico.ca> (raw)
In-Reply-To: <200306061459.40974.damien.dougan@mobilecohesion.com>

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'.  




view thread (3+ messages)  latest in thread

Message-ID: <5.2.1.1.0.20030609100829.026126c0@pop6.sympatico.ca>
Permalink:  ../5.2.1.1.0.20030609100829.026126c0@pop6.sympatico.ca/
Also on:    postgresql.org/message-id/5.2.1.1.0.20030609100829.026126c0@pop6.sympatico.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: fbax@sympatico.ca, damien.dougan@mobilecohesion.com
  Subject: Re: Creating Views with Column Names based on Distinct
  In-Reply-To: <5.2.1.1.0.20030609100829.026126c0@pop6.sympatico.ca>
  References: <200306061459.40974.damien.dougan@mobilecohesion.com> <5.2.1.1.0.20030609100829.026126c0@pop6.sympatico.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox