[sqlite] Re: [unclassified] [sqlite] Re: Why does the FAQ example use 2 copies for adding/deleting a column

2008-01-28 Thread Igor Tandetnik
Lothar Scholz wrote: Transactions do not rewind drop table statements and other schema manipulations. That's not true. Schema changes, including DROP TABLE statemens, done within a transaction can be happily rolled back. Just try it and see. Igor Tandetnik

[sqlite] Re: [unclassified] [sqlite] Re: Why does the FAQ example use 2 copies for adding/deleting a column

2008-01-28 Thread Lothar Scholz
Hello Igor, Tuesday, January 29, 2008, 9:06:56 AM, you wrote: IT> Lothar Scholz IT> 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; >>

[sqlite] Re: Why does the FAQ example use 2 copies for adding/deleting a column

2008-01-28 Thread Igor Tandetnik
Lothar Scholz 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.