pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jie Liang <jliang@ipinc.com>
To: Andreas Tille <tillea@rki.de>
Cc: PostgreSQL SQL <pgsql-sql@hub.org>
Subject: Re: Create table in functions
Date: Wed, 23 Aug 2000 09:46:59 -0700
Message-ID: <39A40003.8F50A962@ipinc.com> (raw)
References: <Pine.LNX.4.21.0008231647290.22247-100000@wr-linux02.rki.de>

Hi, there,

I don't think that you can use DDL in PL/pgSQL, normally say , you can
only use DML in PL/pgSQL.
i.e. you can use select into,update,delete,insert ... , but you cannot use
create, alter, grant ...


Andreas Tille wrote:

> 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.

--
Jie LIANG

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang@ipinc.com
www.ipinc.com






view thread (10+ messages)  latest in thread

Message-ID: <39A40003.8F50A962@ipinc.com>
Permalink:  ../39A40003.8F50A962@ipinc.com/
Also on:    postgresql.org/message-id/39A40003.8F50A962@ipinc.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jliang@ipinc.com, tillea@rki.de, pgsql-sql@hub.org
  Subject: Re: Create table in functions
  In-Reply-To: <39A40003.8F50A962@ipinc.com>
  References: <Pine.LNX.4.21.0008231647290.22247-100000@wr-linux02.rki.de> <39A40003.8F50A962@ipinc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox