couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Carey" <>
Subject Re: Renaming document attributes
Date Wed, 23 Jul 2008 19:41:55 GMT
>> 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.


View raw message