Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35314

Allow changing default collation for a collection

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Index Maintenance, Querying
    • None
    • Query Execution

      The default collation of a collection may be specified during creation (https://docs.mongodb.com/manual/reference/method/db.createCollection/#db.createCollection). However, there is no way to change the default collation of a collection that already exists. For example, collMod does not allow changing the collation option.

      This appears intentional:
      https://docs.google.com/document/d/1SxbSBj50GurIDfUXwLBaEfy3h_SHNkJzia5luj87wWM/edit

      Operations issued against the collection will respect the collection default collation, unless an overriding collation is set on the operation itself. Once the collection has been created, the collation cannot be changed.

      However, implicit collection creation is more common than explicit. Not allowing default collation changes makes it difficult to discover collation needs later in the development/release cycle and forces large code changes to apply collation to cursors.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            justin.labreck@mongodb.com Justin LaBreck
            Votes:
            39 Vote for this issue
            Watchers:
            40 Start watching this issue

              Created:
              Updated: