pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
create stored procedure from temporary table
2+ messages / 2 participants
[nested] [flat]

* create stored procedure from temporary table
@ 2004-11-30 02:57  Nurdin <dja.mnurdin@cma-cgm.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Nurdin @ 2004-11-30 02:57 UTC (permalink / raw)
  To: pgsql-sql; pgsql-general <pgsql-general@postgresql.org>

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

thnax 

nurdin

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: create stored procedure from temporary table
@ 2004-11-30 04:09  Christopher Browne <cbbrowne@acm.org>
  parent: Nurdin <dja.mnurdin@cma-cgm.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Christopher Browne @ 2004-11-30 04:09 UTC (permalink / raw)
  To: 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-11-30 04:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-30 02:57 create stored procedure from temporary table Nurdin <dja.mnurdin@cma-cgm.com>
2004-11-30 04:09 ` Christopher Browne <cbbrowne@acm.org>

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