1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00
Files
postgres/src/interfaces/libpq/test/libpq_testclient.c
Bruce Momjian 50e6eb731d Update copyright for 2025
Backpatch-through: 13
2025-01-01 11:21:55 -05:00

38 lines
617 B
C

/*
* libpq_testclient.c
* A test program for the libpq public API
*
* Copyright (c) 2022-2025, PostgreSQL Global Development Group
*
* IDENTIFICATION
* src/interfaces/libpq/test/libpq_testclient.c
*/
#include "postgres_fe.h"
#include "libpq-fe.h"
static void
print_ssl_library()
{
const char *lib = PQsslAttribute(NULL, "library");
if (!lib)
fprintf(stderr, "SSL is not enabled\n");
else
printf("%s\n", lib);
}
int
main(int argc, char *argv[])
{
if ((argc > 1) && !strcmp(argv[1], "--ssl"))
{
print_ssl_library();
return 0;
}
printf("currently only --ssl is supported\n");
return 1;
}