]> granicus.if.org Git - postgresql/commit
Fixes for PQsetdb():
authorMarc G. Fournier <scrappy@hub.org>
Mon, 19 Aug 1996 13:23:19 +0000 (13:23 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Mon, 19 Aug 1996 13:23:19 +0000 (13:23 +0000)
commit3e1586adfd225d9034c7dc4cb9b8adc1c8f7132e
treeed4f26695f454d0ba2b70b0276dddd393318958e
parent817bf55a120e451aafd93133b9f18feebec3afc9
Fixes for PQsetdb():

When you connect to a database with PQsetdb, as with psql, depending on
how your uninitialized variables are set, you can get a failure with a
"There is no connection to the backend" message.

The fix is to move a call to PQexec() from inside connectDB() to
PQsetdb() after connectDB() returns to PQsetdb().  That way a connection
doesn't have to be already established in order to establish it!

From:  bryanh@giraffe.netgate.net (Bryan Henderson)
src/interfaces/libpq/fe-connect.c