Browse Source

modules/db_postgres: Replaced init_nopool() with init2()

Peter Dunkley 13 years ago
parent
commit
732892b20b

+ 1 - 1
modules/db_postgres/km_db_postgres.c

@@ -85,7 +85,7 @@ int db_postgres_bind_api(db_func_t *dbb)
 
 	dbb->use_table        = db_postgres_use_table;
 	dbb->init             = db_postgres_init;
-	dbb->init_nopool      = db_postgres_init_nopool;
+	dbb->init2            = db_postgres_init2;
 	dbb->close            = db_postgres_close;
 	dbb->query            = db_postgres_query;
 	dbb->fetch_result     = db_postgres_fetch_result;

+ 3 - 3
modules/db_postgres/km_dbase.c

@@ -130,7 +130,7 @@ static void db_postgres_free_query(const db1_con_t* _con);
  */
 db1_con_t *db_postgres_init(const str* _url)
 {
-	return db_do_init(_url, (void*) db_postgres_new_connection, 0);
+	return db_do_init(_url, (void*) db_postgres_new_connection);
 }
 
 /*!
@@ -139,9 +139,9 @@ db1_con_t *db_postgres_init(const str* _url)
  * \return database connection on success, NULL on error
  * \note this function must be called prior to any database functions
  */
-db1_con_t *db_postgres_init_nopool(const str* _url)
+db1_con_t *db_postgres_init2(const str* _url, db_pooling_t pooling)
 {
-	return db_do_init(_url, (void*) db_postgres_new_connection, 1);
+	return db_do_init2(_url, (void*) db_postgres_new_connection, pooling);
 }
 
 /*!

+ 1 - 1
modules/db_postgres/km_dbase.h

@@ -49,7 +49,7 @@ db1_con_t* db_postgres_init(const str* _url);
 /*
  * Initialize database connection - no pooling
  */
-db1_con_t* db_postgres_init_nopool(const str* _url);
+db1_con_t* db_postgres_init2(const str* _url, db_pooling_t pooling);
 
 /*
  * Close a database connection