/********************************************************/
#include <libpq-fe.h>
#include <stdio.h>
-#include "subrou.h"
+
#include "unipos.h"
/*
/* postgresq SQL server. */
/* */
/********************************************************/
-PUBLIC POSPTR *pos_opensql(const char *host,const char *sqlport,const char *dbname)
+POSPTR *pos_opensql(const char *host,const char *sqlport,const char *dbname)
{
#define OPEP "unipos.c:pos_opensql,"
pf=PQsetdbLogin(host,sqlport,z,z,dbname,z,z);
// Check if the connection is successful
if (PQstatus(pf)!=CONNECTION_OK) {
- (void) rou_alert(0,"%s Connection to database '%s' failed, cause '%s'",
- OPEP,dbname,PQerrorMessage(pf));
+ (void) fprintf(stderr,"%s Connection to database '%s' failed, cause '%s'\n",
+ OPEP,dbname,PQerrorMessage(pf));
(void) PQfinish(pf);
pf=(PGconn *)0;
}
/* postgresql SQL server. */
/* */
/********************************************************/
-PUBLIC POSPTR *pos_closesql(POSPTR *posptr)
+POSPTR *pos_closesql(POSPTR *posptr)
{
#define OPEP "unipos.c:pos_closesql,"
pf=(PGconn *)posptr;
if (pf==(PGconn *)0) {
- (void) rou_alert(0,"%s Database link already closedi (Bug?)",OPEP);
+ (void) fprintf(stderr,"%s Database link already closedi (Bug?)\n",OPEP);
(void) PQfinish(pf);
}
else {
/********************************************************/
#include <stdio.h>
-#include "subrou.h"
#include "unisql.h"
/*
/* postgresq SQL server. */
/* */
/********************************************************/
-PUBLIC SQLPTR *sql_opensql(const char *host,const char *sqlport,const char *dbname)
+SQLPTR *sql_opensql(const char *host,const char *sqlport,const char *dbname)
{
#define OPEP "unisql.c:sql_opensql,"
/* postgresql SQL server. */
/* */
/********************************************************/
-PUBLIC SQLPTR *sql_closesql(SQLPTR *sqlptr)
+SQLPTR *sql_closesql(SQLPTR *sqlptr)
{
#define OPEP "sqlpos.c:sql_closesql,"