Rather than calling pg_connect directly, call wpsql_select_db with the best guess at the database name. This sets $GLOBALS['pg4wp_conn'] and avoids reconnecting whenever the guess is correct. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Rather than calling pg_connect directly, call wpsql_select_db with the best guess at the database name. This sets $GLOBALS['pg4wp_conn'] and avoids reconnecting whenever the guess is correct. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>