PostgreSQL Source Code git master
libpq_testclient.c
Go to the documentation of this file.
1/*
2 * libpq_testclient.c
3 * A test program for the libpq public API
4 *
5 * Copyright (c) 2022-2025, PostgreSQL Global Development Group
6 *
7 * IDENTIFICATION
8 * src/interfaces/libpq/test/libpq_testclient.c
9 */
10
11#include "postgres_fe.h"
12
13#include "libpq-fe.h"
14
15static void
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}
25
26int
27main(int argc, char *argv[])
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}
#define fprintf(file, fmt, msg)
Definition: cubescan.l:21
const char * PQsslAttribute(PGconn *conn, const char *attribute_name)
int main(int argc, char *argv[])
static void print_ssl_library()
#define printf(...)
Definition: port.h:244