pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: lucas@presserv.org
Cc: pgsql-sql@postgresql.org
Subject: Re: Table like a field
Date: Wed, 09 Mar 2005 14:19:45 +0000
Message-ID: <422F0601.70103@archonet.com> (raw)
In-Reply-To: <20050309104616.8cjneru7plccgss4@www.presserv.org>
References: <20050309104616.8cjneru7plccgss4@www.presserv.org>
lucas@presserv.org wrote:
> Hello.
> Is there any way to build a table that contain the coluns name for the other
> table fields? like this:
>
> create table people(id serial primary key, name varchar(50) );
> create table people_fields ( field_name varchar(30) );
> insert into people_fields values ('occupation');
> insert into people_fields values ('address');
>
> then I create any function or view to get:
> SELECT * FROM people; //may return
>
> id - name - | ocuppation - address |
You'll want to search the mailing-list archives for "crosstab", and also
look in the contrib/ section of the source distribution.
--
Richard Huxton
Archonet Ltd
view thread (2+ messages)
Message-ID: <422F0601.70103@archonet.com> Permalink: ../422F0601.70103@archonet.com/ Also on: postgresql.org/message-id/422F0601.70103@archonet.com ·
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 using the --to and --cc options: reply via email To: pgsql-sql@postgresql.org Cc: dev@archonet.com, lucas@presserv.org Subject: Re: Table like a field In-Reply-To: <422F0601.70103@archonet.com> * 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