Skip site navigation (1) Skip section navigation (2)

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
Message-ID: 28327.967044666@sss.pgh.pa.us (view raw, whole thread or download thread mbox)
Thread:
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' ;
> 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

In response to

Responses

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group