* findoidjoins.c, requires src/interfaces/libpgeasy
*
*/
+#include "postgres_fe.h"
-#include <stdio.h>
-#include <string.h>
#include "libpq-fe.h"
-
#include "halt.h"
-#include <libpgeasy.h>
+#include "libpgeasy.h"
PGresult *attres,
*relres;
char attname[256];
char typname[256];
int count;
+ char optstr[256];
if (argc != 2)
halt("Usage: %s database\n", argv[0]);
- connectdb(NULL, NULL, NULL, NULL, argv[1]);
+ snprintf(optstr, 256, "dbname=%s", argv[1]);
+ connectdb(optstr);
+
on_error_continue();
on_error_stop();