Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL Exclusion Constraints #17514

Open
Tracked by #16311
janpio opened this issue Jan 24, 2023 · 2 comments
Open
Tracked by #16311

PostgreSQL Exclusion Constraints #17514

janpio opened this issue Jan 24, 2023 · 2 comments
Labels
domain/psl Issue in the "PSL" domain: Prisma Schema Language domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/feature A request for a new feature. status/has-stopgap A stopgap for this functionality has been implemented. topic: constraint topic: database-functionality topic: exclusion constraint topic: indexes topic: postgresql

Comments

@janpio
Copy link
Member

janpio commented Jan 24, 2023

PostgreSQL supports exclusion constraints:

CREATE TABLE circles (
    c circle,
    EXCLUDE USING gist (c WITH &&)
);

(Also described in our DataGuide)

Currently these are falsely introspected as Gist indexes, which leads to problems like #15173

Instead we should figure out how to represent them properly in Prisma Schema Language, and fix introspection and migration of them.

@janpio
Copy link
Member Author

janpio commented Jan 24, 2023

In the meantime, we might make the experience when you have an exclusion constraint less bad: #17515

@gmwill934
Copy link

Any development on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain/psl Issue in the "PSL" domain: Prisma Schema Language domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/feature A request for a new feature. status/has-stopgap A stopgap for this functionality has been implemented. topic: constraint topic: database-functionality topic: exclusion constraint topic: indexes topic: postgresql
Projects
None yet
Development

No branches or pull requests

2 participants