-
Notifications
You must be signed in to change notification settings - Fork 94
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
Feature: policy_is_permissive
to check permissive/restrictive
#343
Comments
Should there also be |
I think it makes sense to have that, yes. Having two functions goes along with other e.g. |
Agreed that Would you like to make a pull request, ideally with tests? |
I'll set some time for it on Thursday and see what I can accomplish. I think I understand everything I need to do except how the compat stuff works (this is a 10+ feature). Is it enough to create one patch file like this one for 9.6 for my migration SQL, or is there more? Would my tests need to indicate somehow that they're 10+? |
There are two approaches: If the code is compatible with 9.6 and earlier, but just doesn't function properly, then we structure the test so that it doesn't execute the tests on 9.6 and earlier, usually by checking the version in a test function and just emitting expected output on earlier versions. If the code is not compatible, and won't even compile, then a patch is necessary on 9.6 and earlier to remove the code. I think we'd just append the relevant patch hunks to this patch. Let me know if you run into difficulty, I can probably help get it over the finish line. |
This would sit parallel to
policy_cmd_is
, checkingpg_catalog.pg_policy.polpermissive
(boolean not null) (introduced in PostgreSQL 10).Implementation of the base case:
and then either
policy_is_restrictive
orpolicy_isnt_permissive
.The text was updated successfully, but these errors were encountered: