Skip to content

Support for indices on arbitrary expressions #3986

@roji

Description

@roji

PostgreSQL supports indices on expressions, as opposed to simple columns. A trivial example is something like:

CREATE UNIQUE INDEX index_users_on_email ON users (lower((email)::text));

I'm not sure how PostgreSQL-specific this feature is... Are there any plans to support this?

These could be defined via the fluent API on the DbContext with an arbitrary SQL expression (a bit like a column's default value). In reveng the IndexModel could be extended with a similar SQL expression property which would then be rendered into the context.

Any comments? Let me know if you'd accept a PR on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions