Re: Create table in functions
| От | Tom Lane |
|---|---|
| Тема | Re: Create table in functions |
| Дата | |
| Msg-id | 28327.967044666@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Create table in functions (Andreas Tille <tillea@rki.de>) |
| Ответы |
RE: Create table in functions
|
| Список | pgsql-sql |
Andreas Tille <tillea@rki.de> writes:
> web=# create function pHelpTable( )
> web-# returns int
> web-# As '
> web'# Begin
> web'# Create Table Temp_NumTable ( Num int ) ;
> web'#
> web'# return 17 ;
> web'# End; '
> web-# language 'plpgsql' ;
> CREATE
The majority of utility commands don't work in plpgsql functions,
because no one had gotten 'round to writing querytree copy routines
for them. Ian Turner finally did all the gruntwork for that a few
weeks ago, so this does work in current sources and will be in 7.1.
I believe you could make this work in 7.0 by using an SQL function
instead of plpgsql, if that helps any...
regards, tom lane
В списке pgsql-sql по дате отправления: