Changes when trying to compile:

- Fix Makefile to include check_dir.c
- Add function mkdir_p that was taken from initdb.c
- Replace some strcpy for assignment to const char * to keep compiler quite
- Add STANDBY_NORMAL to initialize action
- fix typos and add headers needed to compile
This commit is contained in:
Jaime Casanova
2010-09-29 05:13:23 -05:00
parent c809558c3f
commit 3b8e8183cc
7 changed files with 232 additions and 88 deletions

View File

@@ -111,11 +111,11 @@ guc_setted(PGconn *conn, const char *parameter, const char *op, const char *valu
}
char *
const char *
get_cluster_size(PGconn *conn)
{
PGresult *res;
char *size;
const char *size;
char sqlquery[8192];
sprintf(sqlquery, "SELECT pg_size_pretty(SUM(pg_database_size(oid))::bigint) "
@@ -129,7 +129,7 @@ get_cluster_size(PGconn *conn)
PQfinish(conn);
exit(1);
}
strcpy(size, PQgetvalue(res, 0, 0))
size = PQgetvalue(res, 0, 0);
PQclear(res);
return size;
}