Esempio n. 1
0
File: info.c Progetto: no0p/postgres
/*
 * get_db_and_rel_infos()
 *
 * higher level routine to generate dbinfos for the database running
 * on the given "port". Assumes that server is already running.
 */
void
get_db_and_rel_infos(ClusterInfo *cluster)
{
    int			dbnum;

    if (cluster->dbarr.dbs != NULL)
        free_db_and_rel_infos(&cluster->dbarr);

    get_db_infos(cluster);

    for (dbnum = 0; dbnum < cluster->dbarr.ndbs; dbnum++)
        get_rel_infos(cluster, &cluster->dbarr.dbs[dbnum]);

    pg_log(PG_VERBOSE, "\n%s databases:\n", CLUSTER_NAME(cluster));
    if (log_opts.verbose)
        print_db_infos(&cluster->dbarr);
}
Esempio n. 2
0
/*
 * get_db_and_rel_infos()
 *
 * higher level routine to generate dbinfos for the database running
 * on the given "port". Assumes that server is already running.
 */
void
get_db_and_rel_infos(ClusterInfo *cluster)
{
	int			dbnum;

	if (cluster->dbarr.dbs != NULL)
		free_db_and_rel_infos(&cluster->dbarr);

	get_db_infos(cluster);

	for (dbnum = 0; dbnum < cluster->dbarr.ndbs; dbnum++)
		get_rel_infos(cluster, &cluster->dbarr.dbs[dbnum]);

	if (cluster == &old_cluster)
		pg_log(PG_VERBOSE, "\nsource databases:\n");
	else
		pg_log(PG_VERBOSE, "\ntarget databases:\n");

	if (log_opts.verbose)
		print_db_infos(&cluster->dbarr);
}