Re: function that returns dynamicly created table - Mailing list pgsql-novice

From Josh Berkus
Subject Re: function that returns dynamicly created table
Date
Msg-id 200402091953.53867.josh@agliodbs.com
Whole thread Raw
In response to function that returns dynamicly created table  (Michal Holečka <miko@kmit.sk>)
Responses Re: function that returns dynamicly created table
List pgsql-novice
Michal,

> I would like to create function create_table(integer[]) that returns
> dynamically created table. Table is composed of  several tables which
> are left joined together. How many tables are joined is said by function
> argument - integer field..

It's possible in 7.3 and 7.4 but not in earlier versions of PostgreSQL.  See:
http://techdocs.postgresql.org/guides/SetReturningFunctions

WHY you would want to do such a thing is a question which is beyond me
entirely.

--
Josh Berkus
Aglio Database Solutions
San Francisco

pgsql-novice by date:

Previous
From: Michal Holečka
Date:
Subject: function that returns dynamicly created table
Next
From: "Rajan Bhide"
Date:
Subject: Performing COPY Command