#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <arpa/inet.h>
#include <ulogd/ulogd.h>
#include <ulogd/conffile.h>
#include <ulogd/db.h>
#include <libpq-fe.h>
Data Structures | |
struct | pgsql_instance |
Macros | |
#define | DEBUGP(x, args...) |
#define | TIME_ERR ((time_t)-1) |
#define | db_ce(x) (x->ces[DB_CE_NUM+0]) |
#define | host_ce(x) (x->ces[DB_CE_NUM+1]) |
#define | user_ce(x) (x->ces[DB_CE_NUM+2]) |
#define | pass_ce(x) (x->ces[DB_CE_NUM+3]) |
#define | port_ce(x) (x->ces[DB_CE_NUM+4]) |
#define | schema_ce(x) (x->ces[DB_CE_NUM+5]) |
#define | connstr_ce(x) (x->ces[DB_CE_NUM+6]) |
#define | PGSQL_HAVE_NAMESPACE_TEMPLATE "SELECT nspname FROM pg_namespace n WHERE n.nspname='%s'" |
#define | PGSQL_GETCOLUMN_TEMPLATE "SELECT a.attname FROM pg_class c, pg_attribute a WHERE c.relname ='%s' AND a.attnum>0 AND a.attrelid=c.oid ORDER BY a.attnum" |
#define | PGSQL_GETCOLUMN_TEMPLATE_SCHEMA "SELECT a.attname FROM pg_attribute a, pg_class c LEFT JOIN pg_namespace n ON c.relnamespace=n.oid WHERE c.relname ='%s' AND n.nspname='%s' AND a.attnum>0 AND a.attrelid=c.oid AND a.attisdropped=FALSE ORDER BY a.attnum" |
Functions | |
void | __attribute__ ((constructor)) |
#define connstr_ce | ( | x | ) | (x->ces[DB_CE_NUM+6]) |
#define db_ce | ( | x | ) | (x->ces[DB_CE_NUM+0]) |
#define DEBUGP | ( | x, | |
args... | |||
) |
#define host_ce | ( | x | ) | (x->ces[DB_CE_NUM+1]) |
#define pass_ce | ( | x | ) | (x->ces[DB_CE_NUM+3]) |
#define PGSQL_GETCOLUMN_TEMPLATE "SELECT a.attname FROM pg_class c, pg_attribute a WHERE c.relname ='%s' AND a.attnum>0 AND a.attrelid=c.oid ORDER BY a.attnum" |
#define PGSQL_GETCOLUMN_TEMPLATE_SCHEMA "SELECT a.attname FROM pg_attribute a, pg_class c LEFT JOIN pg_namespace n ON c.relnamespace=n.oid WHERE c.relname ='%s' AND n.nspname='%s' AND a.attnum>0 AND a.attrelid=c.oid AND a.attisdropped=FALSE ORDER BY a.attnum" |
#define PGSQL_HAVE_NAMESPACE_TEMPLATE "SELECT nspname FROM pg_namespace n WHERE n.nspname='%s'" |
#define port_ce | ( | x | ) | (x->ces[DB_CE_NUM+4]) |
#define schema_ce | ( | x | ) | (x->ces[DB_CE_NUM+5]) |
#define TIME_ERR ((time_t)-1) |
#define user_ce | ( | x | ) | (x->ces[DB_CE_NUM+2]) |
void __attribute__ | ( | (constructor) | ) |