Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 14678 invoked from network); 23 Jul 2008 19:42:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Jul 2008 19:42:34 -0000 Received: (qmail 57797 invoked by uid 500); 23 Jul 2008 19:42:33 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 57763 invoked by uid 500); 23 Jul 2008 19:42:33 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 57752 invoked by uid 99); 23 Jul 2008 19:42:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jul 2008 12:42:33 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.p.carey@gmail.com designates 74.125.46.154 as permitted sender) Received: from [74.125.46.154] (HELO yw-out-1718.google.com) (74.125.46.154) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jul 2008 19:41:40 +0000 Received: by yw-out-1718.google.com with SMTP id 5so1164815ywr.0 for ; Wed, 23 Jul 2008 12:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=AQ7MXJ/AeigKvKnlHyzGWSREfBfbF/XZKdlOYXSaVPM=; b=uzQ6Y9LgWepJsnaCRVscWZsv/4ds5zVX8oIvf7YmbB5JsHysoVt1V1BvZwwx1h58mK MYjXjg0mF626wpUZcn8mBfvuIGqOWrhJl07FZIjvpqVrYPlJ6ElWX2QupbuVWjydM0Vr DjpL2zGN0LqxcmuT09Z0pTz/HpJVNxx6nWwjE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=RwtN6imuSCTPOnrDsMmoN1PFIYemlQAWe9+O/PVmHM3/TXMAbOulOYm4oHsbT83Jed i4mNNsj5FxZva7TJDvBrY6VpJW96scRw050sqqe5LJNyFBjcS3DOMyWVDgw76ZVrMYZJ FH4jS7qDJ4CyyUsHxbnCYXMAuurPU1sk8VRVk= Received: by 10.150.12.10 with SMTP id 10mr38776ybl.204.1216842116056; Wed, 23 Jul 2008 12:41:56 -0700 (PDT) Received: by 10.151.12.21 with HTTP; Wed, 23 Jul 2008 12:41:55 -0700 (PDT) Message-ID: <13ae4dd50807231241i693609c8j98c74f15a667de5a@mail.gmail.com> Date: Wed, 23 Jul 2008 20:41:55 +0100 From: "Paul Carey" To: couchdb-user@incubator.apache.org Subject: Re: Renaming document attributes In-Reply-To: <6dfc41e10807231140j1b5a7d45ideafdf042ce14571@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <13ae4dd50807230926o10854c59s2436543ca36ace65@mail.gmail.com> <6dfc41e10807231140j1b5a7d45ideafdf042ce14571@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org >> I was wondering if anyone had any ideas on how renaming document >> attributes might be achieved without taking the database offline. > > Perhaps I don't understand, but can't you simply make a new attribute, > copy over the value of the old attribute, delete the old attribute, > and save to the database? > I guess I was thinking along the lines of what to do if, say, hundreds of thousands of documents contained an attribute to be renamed. Copying the old attribute to the new one and saving would certainly work, but this would presumably take some time, during which views that referenced the attribute might return inconsistent data. At some point all views that reference the old attribute would need to be updated with the new attribute name. As I say, I have no need for this myself, at least not now. My question was mostly motivated by curiosity. Paul