Skip to content

Tables with trailing spaces in names cannot be deleted #5175

@Ashwath-Palanisamy

Description

@Ashwath-Palanisamy

Description

When creating a new table in the database with a trailing space (or just a space as the name), the table becomes undeletable.

Expected behavior

Table names should be automatically trimmed of trailing spaces, or Be rejected as invalid during creation.

To Reproduce

  1. Create a new table with a name that has a trailing space (e.g., "users ").

  2. Attempt to delete the table.

  3. Observe that the table cannot be deleted.

can.t.able.to.delete.table.with.trailing.space.mp4

Environment

  • Mathesar version: 0.8.0
  • OS: Debian GNU/Linux 13
  • Browser: Chrome
  • Browser Version: Version 143.0.7499.192

Additional context

This issue makes it difficult to delete tables with whitespace in their names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: triageThis issue has not yet been reviewed by a maintainertype: bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions