Re: Create table in functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Tille <tillea(at)rki(dot)de>
Cc: PostgreSQL SQL <pgsql-sql(at)hub(dot)org>
Subject: Re: Create table in functions
Date: 2000-08-23 15:31:06
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-sql

Andreas Tille <tillea(at)rki(dot)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' ;

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

In response to


Browse pgsql-sql by date

  From Date Subject
Next Message Franz J Fortuny 2000-08-23 16:42:29 Re: Speed or configuration
Previous Message Andreas Tille 2000-08-23 14:49:31 Create table in functions