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
db_postgres: added connection parameters #2622
db_postgres: added connection parameters #2622
Conversation
Updating my repo 04.02.2021
- new config parameter ("con_param") is added to set pg connection parameters
Thanks for the pull request. It seems that you are removing the timeout parameter. This is fine, as it can be replaced with the newly introduced connection parameters. But should be also reflected in the module XML docs (removal of the timeout parameter docs, and addition of a remark that it can be replaced with the new parameter). |
Hi Henning, Timeout parameter is used in two different places: |
@korayvt - a variant that keeps also the backward compatibility is to go over the list of connections parameters and if On another aspect, I would suggest to go for the style of 'param_name=param_value", it seems that the postgres param names are compatible with sip param names, as I can see at the link you provided: So instead of:
It can be:
And the above can also be compacted to:
It would require some changes in function |
Purely as an observer and a db_postgres user, wouldn't it be easier just to pass entire connection strings or connection URIs? That way, Kamailio doesn't need to worry about parsing the params, just to rebuild them for input to libpq https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-CONNSTRING |
Hi Daniel, I will consider your suggestions and make a new commit. Thanks. |
Thanks for your suggestion. |
@korayvt, thank you for that detail. I look forward to this pull request. |
- connection param style changed. - timeout param is used if connect_timeout is not set explicitly. - function renamed - unused variable deleted - doc updated
Thanks! |
- new config parameter ("con_param") is added to set pg connection parameters - timeout param is used if connect_timeout is not set explicitly. Co-authored-by: KORAY VATANSEVER <koray.vatansever@turkcell.com.tr>
Pre-Submission Checklist
in
doc/
subfolder, the README file is autogenerated)Type Of Change
Checklist:
Description
New configuration parameter is added to set postgres connection parameters.