chore: cleanup
parent
9130887d03
commit
15f83c7f10
|
@ -42,11 +42,12 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* Check to see that the backend connection was successfully made */
|
||||
if (PQstatus(conn) != CONNECTION_OK)
|
||||
{
|
||||
fprintf(stderr, "Connection to database failed: %s",
|
||||
PQerrorMessage(conn));
|
||||
exit_nicely(conn);
|
||||
if (PQstatus(conn) != CONNECTION_OK){
|
||||
fprintf(stderr, "Connection to database failed: %s",
|
||||
PQerrorMessage(conn));
|
||||
exit_nicely(conn);
|
||||
}else{
|
||||
printf("main() Connection to database succeded\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
* build instruction
|
||||
|
||||
```
|
||||
gcc -o main main.c -I/usr/include/postgresql -L/usr/lib/x86_64-linux-gnu -lpq -std=c99
|
||||
make
|
||||
```
|
||||
|
||||
* run
|
||||
|
||||
```
|
||||
./main
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue