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

Update deferrable.md #145

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Update deferrable.md #145

merged 1 commit into from
Aug 26, 2024

Conversation

peterthomassen
Copy link
Contributor

Without this change, people reading just the examples will think that URIs must be given to pgtrigger.constraints, whereas they are optional.

I got also quite confused that the URIs aren't passed as a list, but *uris is unzipped by the receiving function. I find that a little unintuitive.

Another suggestion is to skip over non-deferrable triggers, at least when no URIs are given.

@wesleykendall
Copy link
Member

The initial reason for *uris is that the vast majority of pgtrigger.ignore()/pgtrigger.constraints() invocations are over just one trigger. I can definitely support both list/*uris syntax though.

You are correct that the behavior of pgtrigger.constraints() is annoying. It should definitely skip non-deferrable triggers when none are supplied.

For now I will merge just this change in the docs. I'm considering changing the behavior of constraints(), ignore(), etc, to require passing in trigger URIs since some people have been bitten by this already. Will open a discussion

thanks for your change, will merge soon

@wesleykendall wesleykendall merged commit a68c69c into Opus10:main Aug 26, 2024
3 of 4 checks passed
@peterthomassen peterthomassen deleted the patch-4 branch August 26, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants