pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Tille <tillea@rki.de>
Cc: PostgreSQL SQL <pgsql-sql@hub.org>
Subject: Re: Create table in functions
Date: Wed, 23 Aug 2000 11:31:06 -0400
Message-ID: <28327.967044666@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.21.0008231647290.22247-100000@wr-linux02.rki.de>
References: <Pine.LNX.4.21.0008231647290.22247-100000@wr-linux02.rki.de>

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



view thread (10+ messages)  latest in thread

Message-ID: <28327.967044666@sss.pgh.pa.us>
Permalink:  ../28327.967044666@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28327.967044666@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, tillea@rki.de, pgsql-sql@hub.org
  Subject: Re: Create table in functions
  In-Reply-To: <28327.967044666@sss.pgh.pa.us>
  References: <Pine.LNX.4.21.0008231647290.22247-100000@wr-linux02.rki.de> <28327.967044666@sss.pgh.pa.us>

* 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