diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2008-05-09 12:02:24 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2008-05-09 12:02:24 (GMT) |
commit | c5b10564f908b791be3830ae5338c8e66c11fa67 (patch) | |
tree | e8938a40cac280db4a19b30a53a5bffaec69ea3b /reset/reset.c | |
parent | 0b6c47f5b2f17fd35f8624c3c0eedd9d6af040bc (diff) | |
download | 2iv55-c5b10564f908b791be3830ae5338c8e66c11fa67.zip 2iv55-c5b10564f908b791be3830ae5338c8e66c11fa67.tar.gz 2iv55-c5b10564f908b791be3830ae5338c8e66c11fa67.tar.bz2 |
deleted reset app as it is obsoleted by db_demo
Diffstat (limited to 'reset/reset.c')
-rw-r--r-- | reset/reset.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/reset/reset.c b/reset/reset.c deleted file mode 100644 index 5a851ca..0000000 --- a/reset/reset.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * reset.c - * House of Mozart statistic database reset app (c) 2003 oliver - * - * GNU public license *FIXME* - */ - -#include "reset.h" -#include <stdio.h> -#include <getopt.h> -#include <time.h> -#include <libpq-fe.h> - -int main(int argc, char *argv[]) { - PGconn *conn; - char SQL_query[512]; - PGresult *res; - - conn = PQsetdbLogin(PGHOST, PGPORT, PGOPTIONS, PGTTY, DBNAME, LOGIN, PWD); - - - if(CONNECTION_BAD == PQstatus(conn)) { - fprintf(stderr, "Connection to database '%s' failed.\n %s", DBNAME, PQerrorMessage(conn)); - PQfinish(conn); - return 1; - } - - sprintf(SQL_query, ""); - res = PQexec(conn, SQL_query); - - - if((NULL == res) || (PGRES_COMMAND_OK != PQresultStatus(res))) { - printf("Unable to execute query: %s\n %s\n", SQL_query, PQerrorMessage(conn)); - PQclear(res); - PQfinish(conn); - return 1; - } - PQclear(res); - - PQfinish(conn); - - return 0; -} |