PostgreSQL Source Code  git master
libpq_testclient.c File Reference
#include "postgres_fe.h"
#include "libpq-fe.h"
Include dependency graph for libpq_testclient.c:

Go to the source code of this file.

Functions

static void print_ssl_library ()
 
int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 27 of file libpq_testclient.c.

28 {
29  if ((argc > 1) && !strcmp(argv[1], "--ssl"))
30  {
32  return 0;
33  }
34 
35  printf("currently only --ssl is supported\n");
36  return 1;
37 }
static void print_ssl_library()
#define printf(...)
Definition: port.h:244

References print_ssl_library(), and printf.

◆ print_ssl_library()

static void print_ssl_library ( )
static

Definition at line 16 of file libpq_testclient.c.

17 {
18  const char *lib = PQsslAttribute(NULL, "library");
19 
20  if (!lib)
21  fprintf(stderr, "SSL is not enabled\n");
22  else
23  printf("%s\n", lib);
24 }
const char * PQsslAttribute(PGconn *conn, const char *attribute_name)
#define fprintf
Definition: port.h:242

References fprintf, PQsslAttribute(), and printf.

Referenced by main().