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

psqldef: Support PGSSLCERT & PGSSLKEY #446

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

mi-wada
Copy link
Contributor

@mi-wada mi-wada commented Sep 18, 2023

I salute a great tool.

Similar PR

#130

Why I create this PR

Execution of psqldef failed because sslcert and sslkey were not set correctly.

$ psqldef -U username -W password -h 127.0.0.1 -p 26257 -f schema.sql sample
2023/09/18 14:44:28 Error on DumpDDLs: dial tcp 127.0.0.1:26257: connect: connection refused

What I do in this PR

Change to evaluate PGSSLCERT and PGSSLKEY.
This will allow sslcert and sslkey to be set.

Reference

ssl_cert: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLCERT
ssl_key: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLKEY

ENV and option mapping: https://www.postgresql.org/docs/current/libpq-envars.html#LIBPQ-ENVARS

Copy link
Collaborator

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@k0kubun k0kubun merged commit 47812b1 into sqldef:master Sep 21, 2023
@mi-wada mi-wada deleted the support-additional-pg-ssl-options branch September 29, 2023 05:30
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