Module: DB_MYSQL :: the MySQL driver for Kamailio. More...
#include "../../db/db_pool.h"
#include "../../db/db_id.h"
#include <time.h>
#include <libpq-fe.h>


Go to the source code of this file.
Data Structures | |
| struct | pg_con |
Defines | |
| #define | CON_CONNECTED(db_con) (((struct pg_con*)((db_con)->tail))->connected) |
| #define | CON_CONNECTION(db_con) (((struct pg_con*)((db_con)->tail))->con) |
| #define | CON_ID(db_con) (((struct pg_con*)((db_con)->tail))->id) |
| #define | CON_RESULT(db_con) (((struct pg_con*)((db_con)->tail))->res) |
| #define | CON_ROW(db_con) (((struct pg_con*)((db_con)->tail))->row) |
| #define | CON_SQLURL(db_con) (((struct pg_con*)((db_con)->tail))->sqlurl) |
| #define | CON_TIMESTAMP(db_con) (((struct pg_con*)((db_con)->tail))->timestamp) |
Functions | |
| void | db_postgres_free_connection (struct pool_con *con) |
| Close the connection and release memory. | |
| struct pg_con * | db_postgres_new_connection (struct db_id *id) |
| Create a new connection. | |
Module: DB_MYSQL :: the MySQL driver for Kamailio.
Definition in file pg_con.h.
| void db_postgres_free_connection | ( | struct pool_con * | con | ) |
Close the connection and release memory.
| con | connection |
Definition at line 108 of file pg_con.c.
References pg_con::con, free_db_id(), pg_con::id, LM_DBG, pkg_free, and pg_con::res.
Referenced by db_postgres_close().
Create a new connection.
Create a new connection structure in private memory, open the PostgreSQL connection and set reference count to 1
| id | database id |
Definition at line 46 of file pg_con.c.
References pg_con::con, pg_con::connected, db_id::database, db_id::host, pg_con::id, int2str(), LM_DBG, LM_ERR, NULL, db_id::password, pkg_free, pkg_malloc, db_id::port, pg_con::ref, pg_con::timestamp, db_id::username, and ZSW.
Referenced by db_postgres_init().
1.5.6