Skip to content

Truncated node names in relational views can result in duplicate column names #12495

@chiatt

Description

@chiatt

Relational view column names are created from slugified node names. If the node name exceeds the postgres column name limit, postgres simply truncates the name. However, this can result in two columns having the same name. For example:

If chemical_material_elements_found_data_assignment_statement_type_metatype gets truncated to:
chemical_material_elements_found_data_assignment_statement_type and a chemical_material_elements_found_data_assignment_statement_type node already exists in the same card, then the creation of the relational view fails.

To address this we need to check for duplicate nodes and make the duplicate name unique in some way to prevent collisions.

One way to do this would be to use aliases, but we would need to truncate aliases to 63 characters.

Another option would be to limit the length of node names to 63 characters. If more information is needed to describe the node than a 63 character title, it could be saved to the node description.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions