#include "postgres_fe.h"
#include "libpq-fe.h"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 21 of file libpq_uri_regress.c.
22{
28 bool local = true;
29
30 if (argc != 2)
31 return 1;
32
35 {
37 return 1;
38 }
39
41 if (defs == NULL)
42 {
43 fprintf(stderr,
"libpq_uri_regress: cannot fetch default options\n");
44 return 1;
45 }
46
47
48
49
50
51
52
53 for (opt =
opts, def = defs; opt->
keyword; ++opt, ++def)
54 {
56 {
57 if (def->
val == NULL || strcmp(opt->
val, def->
val) != 0)
59
60
61
62
63
64
65
66
67
68
70 (strcmp(opt->
keyword,
"hostaddr") == 0 ||
71 (strcmp(opt->
keyword,
"host") == 0 && *opt->
val !=
'/')))
72 {
73 local = false;
74 }
75 }
76 }
77
78 if (local)
80 else
82
83 return 0;
84}
#define fprintf(file, fmt, msg)
int errmsg(const char *fmt,...)
PQconninfoOption * PQconninfoParse(const char *conninfo, char **errmsg)
PQconninfoOption * PQconndefaults(void)
static AmcheckOptions opts
References errmsg(), fprintf, _PQconninfoOption::keyword, opts, PQconndefaults(), PQconninfoParse(), printf, and _PQconninfoOption::val.