Skip to content

Support for Postgres Range Fields #27975

@khemarato

Description

@khemarato

Feature Summary

Would love if Postgres's range types were natively supported by Prisma:

https://www.postgresql.org/docs/current/rangetypes.html

  • int4range
  • int8range
  • numrange
  • tsrange
  • tstzrange
  • daterange

Use Cases & Problem Description

Lots of real-world data takes the form of ranges: scheduling events, storing values with error bars, etc. My use case is storing metadata about snippets of audio/video data where I need to record the relevant start and end timestamps.

Proposed Solution

The main thing I want is support in Prisma's migrations for the EXCLUDE constraint in addition to support in the connector

Alternative Solutions

Yes, I can probably get by with lt and gt queries. Would just be nice to support more of Postgres's built-in features 😊

Potential Considerations

A bit bespoke for Postgres perhaps.

Prisma Version

No response

What part of Prisma does this affect?

None

Additional Context

No response

Pre-Submission Checklist

  • I have searched existing issues to make sure this is not a duplicate
  • I have checked the Prisma roadmap to see if this is already planned
  • I have described why this belongs in Prisma Core rather than a solution in application code

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureA request for a new feature.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions