Re: Is it possible... - Mailing list pgsql-general

From Joe Conway
Subject Re: Is it possible...
Date
Msg-id 412B67CE.6010204@joeconway.com
Whole thread Raw
In response to Is it possible...  ("Uwe C. Schroeder" <uwe@oss4u.com>)
List pgsql-general
Uwe C. Schroeder wrote:
> parentid firstkey     secondkey
> 1            firstvalue  secondvalue
> 2            firstvalue  secondvalue
>
>
> I hate the idea of writing code that really creates and fills a table,
> particularly since the original table has a lot of rows.
>
> Is the above doable with a view?
> Any pointers will be appreciated.

You can do what you want with set returning functions in
contrib/tablefunc. See examples towards the end of my recent OSCON
presentation:
   http://www.joeconway.com/pres_oscon_2004-r1.pdf
and the source sql:
   http://www.joeconway.com/flex.sql

HTH,

Joe

pgsql-general by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: No connection to a PG 8.0 Beta 1 win32 server
Next
From: Richard Huxton
Date:
Subject: Re: Is it possible...