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

The same function can be registered multiple times with same feature hook in backcountry #23

Closed
jk-shah opened this issue Sep 25, 2022 · 1 comment · Fixed by #62
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jk-shah
Copy link

jk-shah commented Sep 25, 2022

I ran into an issue where I could register multiple times the same function for password_check hook and then pulling my hair on why inserts are happening multiple time. The right solution from a developer way is to make it a UNIQUE constraint so a function f for a feature can be only registered once and keep the usage simple to use and understand.

Also a cleaner way to drop hooks for specific function is preferable (this is referenced in #58)

@jkatz jkatz added the bug Something isn't working label Sep 29, 2022
@jkatz jkatz added this to the 1.0 milestone Sep 30, 2022
@jkatz
Copy link
Contributor

jkatz commented Oct 1, 2022

Include index on feature and proc_name so we don't have the same function run multiple times
#33 (comment)

@jkatz jkatz self-assigned this Oct 5, 2022
@jkatz jkatz closed this as completed in #62 Oct 6, 2022
jkatz added a commit that referenced this issue Oct 6, 2022
This adds a PRIMARY KEY constraint on pgtle.feature_info to
prevent duplicate hook registrations. Specifically, a hook of
(hook,schema,funcname) combo can only be registered once.

fixes #23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants