Re: create stored procedure from temporary table - Mailing list pgsql-sql

From Christopher Browne
Subject Re: create stored procedure from temporary table
Date
Msg-id m3u0r8rn9x.fsf@knuth.knuth.cbbrowne.com
Whole thread Raw
In response to create stored procedure from temporary table  ("Nurdin" <dja.mnurdin@cma-cgm.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Johan Henselmans
Date:
Subject: grouping a many to many relation set
Next
From: Bruce Momjian
Date:
Subject: Re: TEXT::CIDR/INET::CIDR output confusion