Re: Can't drop temp table in subfunction during cursor loop (being used by active queries)

From: jonathansfl <jonathanbrinkman(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Can't drop temp table in subfunction during cursor loop (being used by active queries)
Date: 2011-06-13 13:35:24
Message-ID: 1307972124200-4484358.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How would I create a dynamic table name, using the loop increment as a
parameter?

DROP TABLE IF EXISTS tt_PERSONSTODEACTIVATE || v_iteration CASCADE;

that doesn't work. don't think i can use a dynamic variable as a table name,
so i can't build the table name as a variable. perhaps if the entire DROP
TABLE is inside dynamic SQL and I execute entire script. could try that,
although it's messy for such a simple problem.

i still don't understand still why the TEMP tables are not acting TEMPORARY
and are not going away when their loop ends.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Can-t-drop-temp-table-in-subfunction-during-cursor-loop-being-used-by-active-queries-tp4482806p4484358.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-06-13 13:42:35 Re: Tweaking bytea / large object block sizes?
Previous Message hubert depesz lubaczewski 2011-06-13 12:35:17 Re: determine client os