couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <>
Subject Re: Reserved words
Date Thu, 29 Oct 2009 21:27:26 GMT
On Thu, Oct 29, 2009 at 5:13 PM, Chris Stockton
<> wrote:

> _design/_foo for example is valid as of .10.0, but is that going to
> change?

Most interesting. The specific definitions we've used before are generally:

Underscore prefixes are reserved in the root of a document.
Underscore prefixes are reserved for document ids.

Seeing as the _foo is only internal to the document id, I'm not sure
if it should fall into the reserved scope or not. On the one hand, the
full docid is "_design/_foo" which is logically consistent, but "_foo"
is used internally in quite a few places. I can't think of an argument
for or against right now.

And as Andrew notes, if you're wanting to protect against user
property clashing then you should nest the user properties to avoid
spurious errors. Picking something like # or $ for an app's private
namespace should be fine otherwise.

Paul Davis

View raw message