netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ulogd_output_PGSQL.c File Reference
#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>
Include dependency graph for ulogd_output_PGSQL.c:

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))
 

Macro Definition Documentation

#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])

Function Documentation

void __attribute__ ( (constructor)  )

References ulogd_register_plugin().

Here is the call graph for this function: