CouchDB
  1. CouchDB
  2. COUCHDB-67

Allow unicode chars in database names and _design documents (was: Allow periods (".") in database names)

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Labels:
      None
    • Environment:

      All

    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      Allow periods in database names. We need to find out if a period is among the "safe" characters that can be used for filenames on most filesystems.

        Issue Links

          Activity

          Hide
          Travis Swicegood added a comment -

          So long as you don't allow it to start with a period, you should be fine on the big three (*nix, BSD, and Windows). See the docs for git-check-ref-format - it's explicitly bound to what a filesystem will allow.

          Show
          Travis Swicegood added a comment - So long as you don't allow it to start with a period, you should be fine on the big three (*nix, BSD, and Windows). See the docs for git-check-ref-format - it's explicitly bound to what a filesystem will allow.
          Hide
          Jan Lehnardt added a comment -

          Heya Travis, that's great news. The restriction to safe names comes from Damien (I just relayed the info) and he's used to writing code for all sorts of obscure platforms. the question here is if we are okay with "just" the major three or do we want more and does the mean that we need to be more careful and put some more research into obsucre FS issues?

          I'd say that they are okay, but I am far from a platform expert.

          More input appreciated.

          Show
          Jan Lehnardt added a comment - Heya Travis, that's great news. The restriction to safe names comes from Damien (I just relayed the info) and he's used to writing code for all sorts of obscure platforms. the question here is if we are okay with "just" the major three or do we want more and does the mean that we need to be more careful and put some more research into obsucre FS issues? I'd say that they are okay, but I am far from a platform expert. More input appreciated.
          Hide
          Noah Slater added a comment -

          How doable is it that databases are saved to the filesystem using a hash?

          This way we could allow any arbitary database names.

          Might even be a nice one for me to work on while practicing Erlang.

          Show
          Noah Slater added a comment - How doable is it that databases are saved to the filesystem using a hash? This way we could allow any arbitary database names. Might even be a nice one for me to work on while practicing Erlang.
          Hide
          Chris Anderson added a comment -

          Being able to identify particular databases (and views indexes) in the filesystem is very handy when I'm doing backups, watching view-generation progress, or moving data across machines - the hash approach wouldn't make this impossible, but it would add an extra non-obvious step.

          Unless there's a compelling case for allowing wide choice of database and view names, I'd prefer to have a transparent mapping between the filesystem and CouchDB's interface.

          Show
          Chris Anderson added a comment - Being able to identify particular databases (and views indexes) in the filesystem is very handy when I'm doing backups, watching view-generation progress, or moving data across machines - the hash approach wouldn't make this impossible, but it would add an extra non-obvious step. Unless there's a compelling case for allowing wide choice of database and view names, I'd prefer to have a transparent mapping between the filesystem and CouchDB's interface.
          Hide
          Jan Lehnardt added a comment -

          I agree with Chris

          Show
          Jan Lehnardt added a comment - I agree with Chris
          Hide
          Noah Slater added a comment -

          Good point, I had not thought about that.

          How about we don't put any restrictions, try to create whatever file results from the creation of the database and if the OS returns an error, bubble that up to the HTTP level?

          Show
          Noah Slater added a comment - Good point, I had not thought about that. How about we don't put any restrictions, try to create whatever file results from the creation of the database and if the OS returns an error, bubble that up to the HTTP level?
          Hide
          Jan Lehnardt added a comment -

          Not a good idea when replicating between hosts that don't support one form or another. I think a common baseline is the way to go.

          Show
          Jan Lehnardt added a comment - Not a good idea when replicating between hosts that don't support one form or another. I think a common baseline is the way to go.
          Hide
          Noah Slater added a comment -

          Good point.

          Show
          Noah Slater added a comment - Good point.
          Hide
          Jan Lehnardt added a comment -

          Flag for 0.9. I believe Antony's work on unicode-support for database names will solve this.

          Show
          Jan Lehnardt added a comment - Flag for 0.9. I believe Antony's work on unicode-support for database names will solve this.
          Hide
          Antony Blakey added a comment -

          Yes, and I anticipate solving issue 85 with this.

          Show
          Antony Blakey added a comment - Yes, and I anticipate solving issue 85 with this.
          Hide
          Jan Lehnardt added a comment -

          Changed title by Antony's request.

          Show
          Jan Lehnardt added a comment - Changed title by Antony's request.
          Hide
          Chris Anderson added a comment -

          The work that Antony did so far is available (more or less) at http://github.com/AntonyBlakey/couchdb.notsogood/commit/8e60f9f990e1c987088fc7bff37c60641fb10d01

          It's against an old version of CouchDB, and is missing a few features, but the main module should be relatively the right thing.

          Show
          Chris Anderson added a comment - The work that Antony did so far is available (more or less) at http://github.com/AntonyBlakey/couchdb.notsogood/commit/8e60f9f990e1c987088fc7bff37c60641fb10d01 It's against an old version of CouchDB, and is missing a few features, but the main module should be relatively the right thing.
          Hide
          Jan Lehnardt added a comment -

          Move blocking form 0.9 to 0.10.

          Show
          Jan Lehnardt added a comment - Move blocking form 0.9 to 0.10.
          Hide
          Paul Joseph Davis added a comment -

          If/when this ticket goes anywhere, be sure and address the concerns from COUCHDB-44 for a VERSION files.

          Also, wrapping the Windows support that Mark Hammond and nrstott (sorry I don't remember the real name there) might benefit from the compaction incompatibilities if we go to a directory-per-database model. As in, write a file that is "Active db file" and then we can write new files and atomically crush the active pointer and then delete old versions. Or something like that.

          Show
          Paul Joseph Davis added a comment - If/when this ticket goes anywhere, be sure and address the concerns from COUCHDB-44 for a VERSION files. Also, wrapping the Windows support that Mark Hammond and nrstott (sorry I don't remember the real name there) might benefit from the compaction incompatibilities if we go to a directory-per-database model. As in, write a file that is "Active db file" and then we can write new files and atomically crush the active pointer and then delete old versions. Or something like that.
          Hide
          Noah Slater added a comment -

          Ignore previous comment from Paul, COUCHDB-44 is invalid. Thanks.

          Show
          Noah Slater added a comment - Ignore previous comment from Paul, COUCHDB-44 is invalid. Thanks.
          Hide
          Mark Hammond added a comment -

          I notice the github link to this patch is now invalid - does anyone have a link to a repo with these patches, or a guess about when it might have been posted to the mailing lists, or...?

          Show
          Mark Hammond added a comment - I notice the github link to this patch is now invalid - does anyone have a link to a repo with these patches, or a guess about when it might have been posted to the mailing lists, or...?
          Hide
          Jan Lehnardt added a comment -

          bump to 0.11

          Show
          Jan Lehnardt added a comment - bump to 0.11
          Hide
          Jan Lehnardt added a comment -

          bump version, un-block.

          Show
          Jan Lehnardt added a comment - bump version, un-block.
          Hide
          Jan Lehnardt added a comment -

          The issue has stalled and we haven't gotten any requests to implement this. Closing.

          Show
          Jan Lehnardt added a comment - The issue has stalled and we haven't gotten any requests to implement this. Closing.

            People

            • Assignee:
              Jan Lehnardt
              Reporter:
              Jan Lehnardt
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development