Thread: Issue on calling PQconnectdbParams from C
I'm trying to create a database connection with libpq from C. If I create the same connection with PQconnectdb, everything works fine, but if I create it with PQconnectdbParams function, I get a segmentation fault message, without any other message. Can anybody help me in that issue?
Note: I'm not sure if I posted in the right mailing list, so please guide me if it is the case. Thanks for patience.
Andrei Petru Mura <mapandrei@gmail.com> writes: > I'm trying to create a database connection with libpq from C. If I create > the same connection with PQconnectdb, everything works fine, but if I > create it with PQconnectdbParams function, I get a segmentation fault > message, without any other message. Can anybody help me in that issue? Presumably you constructed the arguments for PQconnectdbParams incorrectly (ie, with a incorrect pointer somewhere) ... but without seeing your code it's hard to be any more specific than that. regards, tom lane