From: Christopher Browne <cbbrowne@acm.org>
To: pgsql-sql@postgresql.org
Subject: Re: create stored procedure from temporary table
Date: Mon, 29 Nov 2004 23:09:14 -0500
Message-ID: <m3u0r8rn9x.fsf@knuth.knuth.cbbrowne.com> (raw)
References: <00de01c4d688$4bc0cf40$8a030b0a@JACARTA.CMACGM.COM>
Oops! dja.mnurdin@cma-cgm.com ("Nurdin") was seen spray-painting on a wall:
> i was wondering, how to create dynamic table like temporary table
> but create from function and the result from function too....cos i
> want count same calculation from other table migh be a multiple
> table so i need looping and join table...
Well, you can define a temporary table inside a stored procedure using
EXECUTE, as long as all of the operations that touch that table are
kept inside dynamic SQL invoked using EXECUTE...
--
output = reverse("moc.liamg" "@" "enworbbc")
http://www.ntlug.org/~cbbrowne/oses.html
"Bonus! The lack of multitasking is one of the most important reasons
why DOS destroyed Unix in the marketplace." -- Scott Nudds
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: cbbrowne@acm.org
Subject: Re: create stored procedure from temporary table
In-Reply-To: <m3u0r8rn9x.fsf@knuth.knuth.cbbrowne.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