function that returns dynamicly created table

From: Michal Holečka <miko(at)kmit(dot)sk>
To: pgsql-novice(at)postgresql(dot)org
Subject: function that returns dynamicly created table
Date: 2004-02-10 01:03:52
Message-ID: 40282DF8.7020503@kmit.sk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi everybody

I am pretty new to postgre and dunno if something like this is possible
in PL/pgSQL

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

example :

field[] = {1,1,1} means function should return table1 left join
(table 2 leftjoin table 3);

field[]= {1,0,0} means function should return table 1;

if it is possible then pls let mi now how.....

thanx a lot
miso

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2004-02-10 03:53:53 Re: function that returns dynamicly created table
Previous Message Lynn.Tilby 2004-02-09 23:42:26 Fwd: Fwd: Lots of nan's