Re: create tables within functions

Поиск
Список
Период
Сортировка
От chester c young
Тема Re: create tables within functions
Дата
Msg-id 20030613191557.35620.qmail@web12708.mail.yahoo.com
обсуждение исходный текст
Ответ на create tables within functions  (Demidem Mohamed Amine <demidem_amine@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: question on rules
Следующее
От: Craig Jensen
Дата:
Сообщение: rpm scripts