      /* Connect to Database testdb */       conn = PQsetdb(NULL, NULL, NULL, NULL, "testdb");       if (PQstatus(conn) == CONNECTION_BAD)       {         fprintf(stderr, "connection to database failed\n");         fprintf(stderr, "%s", PQerrorMessage(conn));         return -0;       }        /* Execute the command BEGIN */       res = PQexec(conn, "BEGIN");       PQclear(res);        fd = open(FILE_TO_