Skip to content

Check constraints that depend on UDFs #184

Open
@aleclarson

Description

@aleclarson

Could an option be added to allow these? I realize that pg-schema-diff doesn't parse dependencies of UDFs, but my tool does, so it's not an issue. I also understand that UDF checks are somewhat of a footgun, considering they don't revalidate when changed, but I'd rather allow them than artificially limit what's possible (and I'm using a UDF check in my app!).

// UDF's in check constraints are a bad idea. Check constraints are not re-validated
// if the UDF changes, so it's not really a safe practice. We won't support it for now
if len(con.DependsOnFunctions) > 0 {
return nil, fmt.Errorf("check constraints that depend on UDFs: %w", ErrNotImplemented)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions