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

2011-06-13 Thread jonathansfl
please explain, as I have no idea what that means. thank you for your reply!! -- 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-tp4482806p4484134.html Sent from the PostgreSQL - general

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

2011-06-13 Thread jonathansfl
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

Re: [GENERAL] temp tables not dropping at end of script

2011-06-13 Thread jonathansfl
we're having a similar situation, where FunctionA calls FunctionB inside a cursor. FunctionB DROPs Temp table, then creates temp table. FunctionA runs through the cursor fine but breaks after the last loop, unable to DROP temporary table because it is being used by active queries in this session.

[GENERAL] Can't drop temp table in subfunction during cursor loop (being used by active queries)

2011-06-12 Thread jonathansfl
Using PG 8.4.2 with Ubuntu 10.04.2 LTS. Inside a cursor of FUNCTION-A, I call another function (FUNCTION-B). Function-B has a Drop ,Table command followed by a CREATE TEMPORARY TABLE command. The cursor loops but when it runs out, it breaks, giving error: Cannot DROP TABLE tt_cms_alerts47

[GENERAL] TO_CHAR(timestamptz,datetimeformat) wrong after DST change

2011-03-18 Thread jonathansfl
My TO_CHAR function is now an hour off thanks to Daylight Savings Time. The dates are correct (I'm in EST: TZ=-04) but my function now returns TIME an hour early. (prior to DST we were TZ=-05). TIMESTAMPTZ data (v_dt): 2011-03-17 18:21:50-04 FUNCTION SNIPPET: to_char(v_dt, 'mm/dd/ hh:mi AM')