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

PQconndefaults should return an array #45

Closed
pfumagalli opened this issue May 17, 2024 · 1 comment
Closed

PQconndefaults should return an array #45

pfumagalli opened this issue May 17, 2024 · 1 comment

Comments

@pfumagalli
Copy link

pfumagalli commented May 17, 2024

The PQconndefaults function actually seems to be returning an array of PQconninfoOption structures.

As far as I can see, here, the code only considers the first element in the array, ignoring all others

let raw = pq_sys::PQconndefaults();

As far as I can understand, it should return something similar to PQconninfoPars like here

pub fn from(dsn: &str) -> crate::errors::Result<Vec<Self>> {

See here: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PQCONNDEFAULTS

@sanpii sanpii closed this as completed in e2e89cb May 17, 2024
@sanpii
Copy link
Owner

sanpii commented May 17, 2024

You right, thank you.

I depreciated the new function in favor of defaults who returns an array.

nyovaya pushed a commit to nyovaya/libpq.rs that referenced this issue Dec 26, 2024
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

No branches or pull requests

2 participants