pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Wood <skwny@email.com>
To: pgsql-sql@postgresql.org
Subject: Creating Tables in Functions
Date: Fri, 19 May 2000 10:28:02 -0400 (EDT)
Message-ID: <383872133.958746482309.JavaMail.root@web14.mail.com> (raw)

All,

I am trying to create a function that will create a temporary table and fill
that table with data.  Here is my function definition below (much simplified
for this discussion):

create function my_function() returns int4 as'

create temp table my_table(a integer);
insert into my_table values (1);
' language 'sql';

When I try to create this function, I always get the error:

ERROR: Relation 'my_table' does not exist

Of course if doesn't exist, I haven't created it yet!  What am I doing
wrong?  I am using 7.0.  Thanks in advance for any help.

Scott
skwny@email.com

-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com





view thread (2+ messages)  latest in thread

Message-ID: <383872133.958746482309.JavaMail.root@web14.mail.com>
Permalink:  ../383872133.958746482309.JavaMail.root@web14.mail.com/
Also on:    postgresql.org/message-id/383872133.958746482309.JavaMail.root@web14.mail.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: skwny@email.com
  Subject: Re: Creating Tables in Functions
  In-Reply-To: <383872133.958746482309.JavaMail.root@web14.mail.com>
  References: <383872133.958746482309.JavaMail.root@web14.mail.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