exyi / pg2parquet

Export PostgreSQL table or query into Parquet file
Apache License 2.0
57 stars 11 forks source link

Add support for Postgres TLS connections. #3

Closed kurtraschke closed 1 year ago

kurtraschke commented 1 year ago

This PR (the continuation of #2) adds support for TLS connections using the postgres-native-tls crate.

It will build natively on any Linux architecture where OpenSSL is available, as well as on Windows and macOS (where system facilities for TLS are used). Cross-compilation is trickier.

exyi commented 1 year ago

Thanks! You can use conditions like #[cfg(not(any(target_arch = "riscv64", ...)))] on a function, and [target.'cfg(not(any(target_arch = "riscv64", ...)))'.dependencies] to conditionally support TLS only on reasonable architectures. I really don't mind if it isn't supported on riscV. tatically linking OpenSSL is not a great idea anyway, so it would make sense to not support it in the static musl build :]

exyi commented 1 year ago

Thanks, I pushed it as version 0.1.0-beta.3 to crates.io