Lothar Scholz
<scholz-qqUfbLNYxjJCkLs28/[EMAIL PROTECTED]> wrote:
This is copying the whole table twice. Is there any reason why it
shouldn't be:

BEGIN TRANSACTION;
CREATE TEMPORARY TABLE t1_backup(a,b);
INSERT INTO t1_backup SELECT a,b FROM t1;
DROP TABLE t1;
ALTER TABLE t1_backup RENAME TO t1;
COMMIT;

t1_backup is a temporary table. You want a permanent table in the main database. ALTER TABLE cannot magically move a table from temp database to main - the two databases are physically in two different files.

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to