• Marc G. Fournier's avatar
    Fixes: · 77e01653
    Marc G. Fournier authored
    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)
    77e01653
fe-connect.c 12.4 KB