Re: [GENERAL] Delete temp tables

2000-10-25 Thread Vilson farias
: In short: if you want to delete a table there is one and only one : safe method to do it: DROP TABLE. The key difference between a temp : table and a regular table is that the DROP will be done for you : automatically when you disconnect. Now why? relatorio=# DROP TABLE "pg_temp.1823.17"; ERR

Re: [GENERAL] Delete temp tables

2000-10-24 Thread Tom Lane
"Vilson farias" <[EMAIL PROTECTED]> writes: > I'm writing a script to erase non-droped temp tables. Er, why don't you just disconnect? > **But when I execute a delete, nothing happens: > relatorio=# DELETE FROM pg_tables WHERE tablename like 'pg_temp.%'; > DELETE 0 Fortunately for you, pg_table

[GENERAL] Delete temp tables

2000-10-24 Thread Vilson farias
Hi people! I'm writing a script to erase non-droped temp tables. When I tried to delete from pg_tables, the following problem raises: **check out, there are data: relatorio=# SELECT COUNT(*) FROM pg_tables WHERE tablename like 'pg_temp.%'; count --- 101 (1 row) **There are data, reall