[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: wc-ng: using backup tables ...

From: Hyrum K. Wright <hyrum_at_hyrumwright.org>
Date: Mon, 12 Oct 2009 10:52:21 -0500

On Oct 9, 2009, at 1:39 PM, Greg Stein wrote:

> On Fri, Oct 9, 2009 at 14:34, Bhuvaneswaran A <bhuvan_at_collab.net>
> wrote:
>> I've 2 queries related to wc-ng related sqls defined in wc-
>> metadata.sql
>> file:
>>
>> 1) We create backup tables explicitly to store records from original
>> tables. We use the sqls in following style:
>> create table foo_temp (col1 int);
>> insert into foo_temp select col1 from foo;
>> drop table foo;
>> create table foo (col1 int);
>> insert into foo select col1 from foo_temp;
>> drop table foo_temp;
>>
>> Instead, why shouldn't use the following style:
>> create table foo_temp as select col1 from foo;
>> drop table foo;
>> create table foo (col1 int);
>> insert into foo select col1 from foo_temp;
>> drop table foo_temp;
>
> That seems fine. Maybe Hyrum didn't know a table could be created
> that way.

This may be possible; I was just following the recipe given by http://sqlite.org/faq.html#q11

>> 2) We use 2 backup tables, BASE_NODE_BACKUP and ACTUAL_NODE_BACKUP.
>> The
>> former is defined as a TEMPORARY table, while the latter is defined
>> as
>> normal table. Any specific reason for doing so? Why can't they
>> maintain
>> same standard, perhaps being a TEMPORARY table?
>
> Yah, they should probably both be TEMPORARY.

Agreed.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2406711
Received on 2009-10-12 17:52:36 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.