1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Massive examples fix from Nicola Bernardelli

This commit is contained in:
Bruce Momjian
1997-09-25 16:35:52 +00:00
parent 0384d37083
commit 2f4275327e
8 changed files with 78 additions and 59 deletions

View File

@@ -19,15 +19,17 @@ INSERT INTO TBL1 values (10);
*
*/
#include <stdio.h>
#include <stdlib.h>
#include "libpq-fe.h"
void
static void
exit_nicely(PGconn *conn)
{
PQfinish(conn);
exit(1);
}
int
main()
{
char *pghost,
@@ -35,9 +37,10 @@ main()
*pgoptions,
*pgtty;
char *dbName;
int nFields;
int i,
j;
/* int nFields;
* int i,
* j;
*/
PGconn *conn;
PGresult *res;
@@ -103,5 +106,5 @@ main()
/* close the connection to the database and cleanup */
PQfinish(conn);
return 0; /* Though PQfinish(conn1) has called exit(1) */
}