driver-pgsql.c revision dc9de21d4375faeedbe5b7e941502ac578650da9
2ronwalf#include "sql-api-private.h"
2ronwalf#ifdef HAVE_PGSQL
2ronwalf#include <libpq-fe.h>
2ronwalf const char *connect_string;
2ronwalfstruct pgsql_result {
18daenzerorama unsigned int fields_count;
18daenzerorama const char **fields;
18daenzerorama const char **values;
18daenzerorama void *context;
18daenzeroramastruct pgsql_queue {
18daenzerorama char *query;
18daenzerorama void *context;
18daenzerorama const char *error;
const char *msg;
int ret;
switch (ret) {
case PGRES_POLLING_READING:
case PGRES_POLLING_WRITING:
case PGRES_POLLING_OK:
case PGRES_POLLING_FAILED:
static enum sql_db_flags
if (free_result)
int ret;
if (ret > 0)
if (ret < 0) {
int ret;
if (ret < 0) {
if (ret > 0) {
static struct sql_result *
case PGRES_COMMAND_OK:
case PGRES_TUPLES_OK:
case PGRES_EMPTY_QUERY:
case PGRES_NONFATAL_ERROR:
const char *field_name)
unsigned int idx)
return NULL;
const char *field_name)
int idx;
if (idx < 0)
return NULL;
const char *msg;
static struct sql_transaction_context *
const char **error_r)
NULL,