Skip to content
Snippets Groups Projects
Commit 0ccf3c88 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Update pgeasy examples

parent 9bd604f3
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "libpq-fe.h" #include "libpq-fe.h"
#include "halt.h" #include "halt.h"
#include "libpgeasy.h" #include <libpgeasy.h>
PGresult *attres, PGresult *attres,
*relres; *relres;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <time.h> #include <time.h>
#include <libpq-fe.h> #include <libpq-fe.h>
#include "../halt.h" #include "../halt.h"
#include "libpgeasy.h" #include <libpgeasy.h>
int int
main(int argc, char **argv) main(int argc, char **argv)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <time.h> #include <time.h>
#include <libpq-fe.h> #include <libpq-fe.h>
#include "../halt.h" #include "../halt.h"
#include "libpgeasy.h" #include <libpgeasy.h>
int int
main(int argc, char **argv) main(int argc, char **argv)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <stdio.h> #include <stdio.h>
#include <libpq-fe.h> #include <libpq-fe.h>
#include "../halt.h" #include "../halt.h"
#include "libpgeasy.h" #include <libpgeasy.h>
int int
main(int argc, char **argv) main(int argc, char **argv)
......
...@@ -77,7 +77,9 @@ disconnectdb() ...@@ -77,7 +77,9 @@ disconnectdb()
PGresult * PGresult *
doquery(char *query) doquery(char *query)
{ {
if (res != NULL && in_result_block == FALSE && was_get_unset_result == FALSE) if (res != NULL &&
in_result_block == FALSE &&
was_get_unset_result == FALSE)
PQclear(res); PQclear(res);
was_get_unset_result = FALSE; was_get_unset_result = FALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment