mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Run pgindent on 9.2 source tree in preparation for first 9.3
commit-fest.
This commit is contained in:
@@ -112,9 +112,9 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Non-option argument specifies database name
|
||||
* as long as it wasn't already specified with -d / --dbname
|
||||
/*
|
||||
* Non-option argument specifies database name as long as it wasn't
|
||||
* already specified with -d / --dbname
|
||||
*/
|
||||
if (optind < argc && dbname == NULL)
|
||||
{
|
||||
|
||||
@@ -185,7 +185,7 @@ connectMaintenanceDatabase(const char *maintenance_db, const char *pghost,
|
||||
enum trivalue prompt_password,
|
||||
const char *progname)
|
||||
{
|
||||
PGconn *conn;
|
||||
PGconn *conn;
|
||||
|
||||
/* If a maintenance database name was specified, just connect to it. */
|
||||
if (maintenance_db)
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#define COMMON_H
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "getopt_long.h" /* pgrminclude ignore */
|
||||
#include "pqexpbuffer.h" /* pgrminclude ignore */
|
||||
#include "getopt_long.h" /* pgrminclude ignore */
|
||||
#include "pqexpbuffer.h" /* pgrminclude ignore */
|
||||
|
||||
enum trivalue
|
||||
{
|
||||
@@ -34,8 +34,8 @@ extern PGconn *connectDatabase(const char *dbname, const char *pghost,
|
||||
bool fail_ok);
|
||||
|
||||
extern PGconn *connectMaintenanceDatabase(const char *maintenance_db,
|
||||
const char *pghost, const char *pgport, const char *pguser,
|
||||
enum trivalue prompt_password, const char *progname);
|
||||
const char *pghost, const char *pgport, const char *pguser,
|
||||
enum trivalue prompt_password, const char *progname);
|
||||
|
||||
extern PGresult *executeQuery(PGconn *conn, const char *query,
|
||||
const char *progname, bool echo);
|
||||
|
||||
@@ -92,10 +92,9 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/*
|
||||
* We set dbname from positional arguments if it is not
|
||||
* already set by option arguments -d. If not doing
|
||||
* listlangs, positional dbname must follow positional
|
||||
* langname.
|
||||
* We set dbname from positional arguments if it is not already set by
|
||||
* option arguments -d. If not doing listlangs, positional dbname must
|
||||
* follow positional langname.
|
||||
*/
|
||||
|
||||
if (argc - optind > 0)
|
||||
|
||||
@@ -21,7 +21,7 @@ static void help(const char *progname);
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
static int if_exists = 0;
|
||||
static int if_exists = 0;
|
||||
|
||||
static struct option long_options[] = {
|
||||
{"host", required_argument, NULL, 'h'},
|
||||
@@ -129,7 +129,7 @@ main(int argc, char *argv[])
|
||||
maintenance_db = "template1";
|
||||
|
||||
conn = connectMaintenanceDatabase(maintenance_db,
|
||||
host, port, username, prompt_password, progname);
|
||||
host, port, username, prompt_password, progname);
|
||||
|
||||
if (echo)
|
||||
printf("%s", sql.data);
|
||||
|
||||
@@ -91,10 +91,9 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/*
|
||||
* We set dbname from positional arguments if it is not
|
||||
* already set by option arguments -d. If not doing
|
||||
* listlangs, positional dbname must follow positional
|
||||
* langname.
|
||||
* We set dbname from positional arguments if it is not already set by
|
||||
* option arguments -d. If not doing listlangs, positional dbname must
|
||||
* follow positional langname.
|
||||
*/
|
||||
|
||||
if (argc - optind > 0)
|
||||
|
||||
@@ -122,9 +122,9 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Non-option argument specifies database name
|
||||
* as long as it wasn't already specified with -d / --dbname
|
||||
/*
|
||||
* Non-option argument specifies database name as long as it wasn't
|
||||
* already specified with -d / --dbname
|
||||
*/
|
||||
if (optind < argc && dbname == NULL)
|
||||
{
|
||||
|
||||
@@ -135,10 +135,10 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Non-option argument specifies database name
|
||||
* as long as it wasn't already specified with -d / --dbname
|
||||
|
||||
/*
|
||||
* Non-option argument specifies database name as long as it wasn't
|
||||
* already specified with -d / --dbname
|
||||
*/
|
||||
if (optind < argc && dbname == NULL)
|
||||
{
|
||||
@@ -312,7 +312,7 @@ vacuum_all_databases(bool full, bool verbose, bool and_analyze, bool analyze_onl
|
||||
int i;
|
||||
|
||||
conn = connectMaintenanceDatabase(maintenance_db, host, port,
|
||||
username, prompt_password, progname);
|
||||
username, prompt_password, progname);
|
||||
result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1;", progname, echo);
|
||||
PQfinish(conn);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user