create tables within functions

From: Demidem Mohamed Amine <demidem_amine(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: create tables within functions
Date: 2003-06-13 15:07:43
Message-ID: 20030613150743.46827.qmail@web13603.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hello,

Can anyone help me create a function that creates a
table, in this way for example :

create function create_table(text) returns integer as
'
begin
create table $1 (id integer, stuff text);
return 0;
end;'
language plpgsql;

it does not work !!

thnx

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-06-13 15:22:42 Re: create tables within functions
Previous Message Tom Lane 2003-06-13 13:57:25 Re: trigger : emulate "instead of" with before ?