Re: create tables within functions - Mailing list pgsql-sql

From chester c young
Subject Re: create tables within functions
Date
Msg-id 20030613191557.35620.qmail@web12708.mail.yahoo.com
Whole thread Raw
In response to create tables within functions  (Demidem Mohamed Amine <demidem_amine@yahoo.com>)
List pgsql-sql
--- Demidem Mohamed Amine <demidem_amine@yahoo.com> wrote:
> hello,
> 
> Can anyone help me create a function that creates a table:

create function create_table( text ) returns integer as '
declare p_tab alias for $1; v_exec text;
begin v_exec := ''create table '' || p_tab || ''( id integer )''; execute v_exec;
end;
' language 'plpgsql'; 



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


pgsql-sql by date:

Previous
From: Jan Wieck
Date:
Subject: Re: question on rules
Next
From: Craig Jensen
Date:
Subject: rpm scripts