-
Notifications
You must be signed in to change notification settings - Fork 79
postgresql_role: add optional attribute to set search_path #93
Conversation
b3d6709
to
3dd0db8
Compare
Reading more into #90, I believe our implementations are similar but I am lacking proper handling for all the edge cases of schema names. Also, my implementation currently runs |
Hi @Hjdskes , Thanks for opening this PR and for your work ! Sorry I did not answer earlier, I was a bit out of open source stuff last weeks (who said holidays :) ? ) I'll take a look at your PR in the next days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round of remarks. I'll try to test a bit more.
Regarding your remark:
I am lacking proper handling for all the edge cases of schema names.
I'm not against starting with an easy way by not managing corner case as soon as it's clear for the user.
So could you add a validation on the schemas names to assert that there's no corner cases in their names and display a clear error to the user otherwise?
Thanks for getting back to me! I'll process your review this weekend, hopefully. |
I have pushed a new commit that fixes your comments @cyrilgdn. I still have to add a simple validation, which I will do in a separate commit. I can squash those later, if preferred. |
Rebased on current master |
c9921bd
to
a910e00
Compare
I've added a limited form of input validation that checks for the presence of the substring |
Since we split Postgres' output on commas (specifically, ", "), input values for the search path may not contain this substring. This is legal in Postgres, however, so we need to check for it.
Thanks! I have responded in the PR itself. |
Resolve test issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work well, thanks a lot 👍 🎉
Awesome, thank you! |
@Hjdskes v1.3.0 has been released on Friday with this |
This PR adds a new attribute to
postgresql_role
that allows one to set the search path of the new role. Let me know if there's anything I missed or can improve!