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

Create table in functions

From: Andreas Tille <tillea(at)rki(dot)de>
To: PostgreSQL SQL <pgsql-sql(at)hub(dot)org>
Subject: Create table in functions
Date: 2000-08-23 14:49:31
Message-ID: Pine.LNX.4.21.0008231647290.22247-100000@wr-linux02.rki.de (view raw or flat)
Thread:
Lists: pgsql-sql
Hello,

I striped down my function up to a strange thing:

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
web=# 
web=# select pHelpTable( );
ERROR:  copyObject: don't know how to copy 611
web=# 


What does this mean?  The ERROR is caused by the Create Table statement
(when I removed it from my complex function it worked well).
So why doesn't this work and what copy function fails here??

Kind regards

          Andreas.


Responses

pgsql-sql by date

Next:From: Tom LaneDate: 2000-08-23 15:31:06
Subject: Re: Create table in functions
Previous:From: Adam LangDate: 2000-08-23 14:42:50
Subject: Re: Copy To - fixed width

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