#include <postgresql/libpq-fe.h>
#include <stdio.h>

int
main(int argc, char **argv)
{
	PGconn *db = PQconnectdb("postgresql://mlilback@10.0.2.2/mlilback?application_name=rsession");
	PGresult *res = PQexec(db, "select id,bindata from rcfiledata where id = 106");
	ExecStatusType rc = PQresultStatus(res);
	if (PGRES_TUPLES_OK != rc) {
		fprintf(stderr, "error executing query\n");
		return 1;
	}
	printf("got results\n");
	PQfinish(db);
	return 0;
}
