I decided to remove the intermediate link and as a whole to simplify the decision, having transferred everything to the java program. There is a code on С++, reading of database postgresql
#include <iostream>
//using namespace std;
#include <stdio.h>
#include "libpq-fe.h"
#include <string>
#include <cstdio>
#include <stdlib.h>
int main() {
PGconn *conn;
PGresult *res;
int rec_count;
int row;
int col;
FILE *stream;
conn = PQconnectdb("hostaddr=192.168.143.93 port=5432 connect_timeout=10 dbname=NexentaSearch user=postgres password=postgres");
if (PQstatus(conn) == CONNECTION_BAD) {
fprintf(stderr, "Connection to database failed: %s\n",PQerrorMessage(conn));
puts("No connection");
exit(0);
}
res = PQexec(conn, "select path from tasks order by id");
if (PQresultStatus(res) != PGRES_TUPLES_OK) {
printf("We didn't get the data");
exit(0);
}
rec_count = PQntuples(res);
I want to execute the same request to postgresql to a database on Java and to write results in ArrayList . Help to make it please.