PostgreSQL Source Code git master
|
#include "postgres_fe.h"
#include "catalog/pg_class_d.h"
#include "common/connect.h"
#include "common/logging.h"
#include "common/string.h"
#include "getopt_long.h"
#include "libpq-fe.h"
#include "pg_getopt.h"
Go to the source code of this file.
Data Structures | |
struct | eary |
struct | options |
Macros | |
#define | PARAMS_ARRAY_SIZE 7 |
Functions | |
static void | help (const char *progname) |
void | get_opts (int argc, char **argv, struct options *my_opts) |
void | add_one_elt (char *eltname, eary *eary) |
char * | get_comma_elts (eary *eary) |
PGconn * | sql_conn (struct options *my_opts) |
int | sql_exec (PGconn *conn, const char *todo, bool quiet) |
void | sql_exec_dumpalldbs (PGconn *conn, struct options *opts) |
void | sql_exec_dumpalltables (PGconn *conn, struct options *opts) |
void | sql_exec_searchtables (PGconn *conn, struct options *opts) |
void | sql_exec_dumpalltbspc (PGconn *conn, struct options *opts) |
int | main (int argc, char **argv) |
#define PARAMS_ARRAY_SIZE 7 |
void add_one_elt | ( | char * | eltname, |
eary * | eary | ||
) |
Definition at line 235 of file oid2name.c.
References eary::alloc, eary::array, eary::num, pg_malloc(), pg_realloc(), and pg_strdup().
Referenced by get_opts().
char * get_comma_elts | ( | eary * | eary | ) |
Definition at line 261 of file oid2name.c.
References eary::array, i, eary::num, pg_malloc(), pg_strdup(), PQescapeString(), and sprintf.
Referenced by sql_exec_searchtables().
void get_opts | ( | int | argc, |
char ** | argv, | ||
struct options * | my_opts | ||
) |
Definition at line 63 of file oid2name.c.
References add_one_elt(), options::dbname, exit(), options::extended, options::filenumbers, get_progname(), getopt_long(), help(), options::hostname, options::indexes, no_argument, options::nodb, options::oids, optarg, optind, pg_log_error, pg_log_error_hint, pg_logging_init(), pg_strdup(), options::port, options::progname, progname, options::quiet, required_argument, options::systables, options::tables, options::tablespaces, and options::username.
Referenced by main().
|
static |
Definition at line 201 of file oid2name.c.
References printf, and progname.
Referenced by get_opts().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 583 of file oid2name.c.
References eary::alloc, options::dbname, exit(), options::filenumbers, get_opts(), options::nodb, eary::num, options::oids, pg_malloc(), PQfinish(), printf, options::quiet, sql_conn(), sql_exec_dumpalldbs(), sql_exec_dumpalltables(), sql_exec_dumpalltbspc(), sql_exec_searchtables(), options::tables, and options::tablespaces.
Definition at line 295 of file oid2name.c.
References ALWAYS_SECURE_SEARCH_PATH_SQL, conn, CONNECTION_BAD, options::dbname, exit(), options::hostname, keywords, PARAMS_ARRAY_SIZE, password, pg_fatal, pg_log_error, PGRES_TUPLES_OK, options::port, PQclear(), PQconnectdbParams(), PQconnectionNeedsPassword(), PQerrorMessage(), PQexec(), PQfinish(), PQresultStatus(), PQstatus(), options::progname, res, simple_prompt(), options::username, and values.
Referenced by main().
int sql_exec | ( | PGconn * | conn, |
const char * | todo, | ||
bool | quiet | ||
) |
Definition at line 372 of file oid2name.c.
References conn, exit(), fprintf, free, i, j, pg_log_error, pg_log_error_detail, pg_malloc(), PQclear(), PQerrorMessage(), PQexec(), PQfinish(), PQfname(), PQgetvalue(), PQnfields(), PQntuples(), PQresultStatus(), res, and generate_unaccent_rules::stdout.
Referenced by sql_exec_dumpalldbs(), sql_exec_dumpalltables(), sql_exec_dumpalltbspc(), and sql_exec_searchtables().
Definition at line 452 of file oid2name.c.
References conn, opts, snprintf, and sql_exec().
Referenced by main().
Definition at line 469 of file oid2name.c.
References conn, CppAsString2, opts, snprintf, and sql_exec().
Referenced by main().
Definition at line 571 of file oid2name.c.
References conn, opts, snprintf, and sql_exec().
Referenced by main().
Definition at line 501 of file oid2name.c.
References conn, CppAsString2, free, get_comma_elts(), opts, pg_malloc(), psprintf(), sprintf, and sql_exec().
Referenced by main().