Commit fe521c11 authored by Pavel Vainerman's avatar Pavel Vainerman

(PGSQL): предварительная версия

parent 627ea7d9
%def_enable docs
%def_enable mysql
%def_enable sqlite
%def_enable postgresql
%def_enable pgsql
%def_enable python
%def_enable rrd
%def_enable io
......@@ -43,7 +43,7 @@ BuildRequires: libMySQL-devel
BuildRequires: libsqlite3-devel
%endif
%if_enabled postgresql
%if_enabled pgsql
BuildRequires: postgresql9.3-devel libpq5.6-devel
%endif
......@@ -180,21 +180,21 @@ Requires: %name-extension-common = %version-%release
Libraries needed to develop for uniset SQLite
%endif
%if_enabled postgresql
%package extension-postgresql
%if_enabled pgsql
%package extension-pgsql
Group: Development/Databases
Summary: PostgreSQL-dbserver implementatioin for UniSet
Requires: %name-extension-common = %version-%release
%description extension-postgresql
%description extension-pgsql
PostgreSQL dbserver for %name
%package extension-postgresql-devel
%package extension-pgsql-devel
Group: Development/Databases
Summary: Libraries needed to develop for uniset PostgreSQL
Requires: %name-extension-common-devel = %version-%release
%description extension-postgresql-devel
%description extension-pgsql-devel
Libraries needed to develop for uniset PostgreSQL
%endif
......@@ -264,7 +264,7 @@ SharedMemoryPlus extension ('all in one') for libuniset
%build
%autoreconf
%configure %{subst_enable doc} %{subst_enable mysql} %{subst_enable sqlite} %{subst_enable postgresql} %{subst_enable python} %{subst_enable rrd} %{subst_enable io} %{subst_enable logicproc} %{subst_enable tests}
%configure %{subst_enable doc} %{subst_enable mysql} %{subst_enable sqlite} %{subst_enable pgsql} %{subst_enable python} %{subst_enable rrd} %{subst_enable io} %{subst_enable logicproc} %{subst_enable tests}
%make
%install
......@@ -315,8 +315,8 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%if_enabled sqlite
%_includedir/%oname/sqlite/
%endif
%if_enabled postgresql
%_includedir/%oname/postgresql/
%if_enabled pgsql
%_includedir/%oname/pgsql/
%endif
%_libdir/libUniSet2.so
......@@ -341,12 +341,12 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%_pkgconfigdir/libUniSet2SQLite.pc
%endif
%if_enabled postgresql
%files extension-postgresql
%_bindir/%oname-postgresql-*dbserver
%_libdir/*-postgresql.so*
%if_enabled pgsql
%files extension-pgsql
%_bindir/%oname-pgsql-*dbserver
%_libdir/*-pgsql.so*
%files extension-postgresql-devel
%files extension-pgsql-devel
%_pkgconfigdir/libUniSet2PostgreSQL.pc
%endif
......
......@@ -81,6 +81,23 @@ fi
AM_CONDITIONAL(DISABLE_MYSQL, test ${buildmysql} = false)
#check pgsql support
AC_MSG_CHECKING([postgresql support])
buildpgsql=true
AC_ARG_ENABLE(pgsql, AC_HELP_STRING([--disable-pgsql], [disable PostgreSQL support]),
[ if test $enableval = yes; then buildpgsql=true; else buildpgsql=false; fi],[ buildpgsql=true; ])
if test ${buildpgsql} = true; then
AC_MSG_RESULT([enabled])
PKG_CHECK_MODULES(PGSQL,libpq)
AC_SUBST(PGSQL_LIBS)
AC_SUBST(PGSQL_CFLAGS)
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_PGSQL, test ${buildpgsql} = false)
#check rrd support
AC_MSG_CHECKING([rrd support])
......@@ -330,6 +347,8 @@ AC_CONFIG_FILES([Makefile
extensions/DBServer-MySQL/libUniSet2MySQL.pc
extensions/DBServer-SQLite/Makefile
extensions/DBServer-SQLite/libUniSet2SQLite.pc
extensions/DBServer-PostgreSQL/Makefile
extensions/DBServer-PostgreSQL/libUniSet2PostgreSQL.pc
extensions/IOControl/Makefile
extensions/IOControl/libUniSet2IOControl.pc
extensions/ModbusMaster/Makefile
......
......@@ -36,7 +36,7 @@
using namespace UniSetTypes;
using namespace std;
// --------------------------------------------------------------------------
#define dblog if( ulog()->debugging(DBLogInfoLevel) ) (*(ulog().get()))[DBLogInfoLevel]
#define dblog if( ulog()->debugging(DBLogInfoLevel) ) ulog()->debug(DBLogInfoLevel)
// --------------------------------------------------------------------------
DBServer_MySQL::DBServer_MySQL(ObjectId id):
DBServer(id),
......
......@@ -12,11 +12,10 @@
using namespace UniSetTypes;
using namespace std;
// --------------------------------------------------------------------------
const Debug::type DBLEVEL = Debug::LEVEL1;
#define dblog if( ulog()->debugging(DBLogInfoLevel) ) ulog()->debug(DBLogInfoLevel)
// --------------------------------------------------------------------------
DBServer_PostgreSQL::DBServer_PostgreSQL(ObjectId id):
DBServer_PostgreSQL::DBServer_PostgreSQL(ObjectId id, const std::string& prefix ):
DBServer(id),
db(new PostgreSQLInterface()),
PingTime(300000),
ReconnectTime(180000),
connect_ok(false),
......@@ -24,6 +23,8 @@ DBServer_PostgreSQL::DBServer_PostgreSQL(ObjectId id):
qbufSize(200),
lastRemove(false)
{
db = make_shared<PostgreSQLInterface>();
if( getId() == DefaultObjectId )
{
ostringstream msg;
......@@ -34,7 +35,6 @@ DBServer_PostgreSQL::DBServer_PostgreSQL(ObjectId id):
DBServer_PostgreSQL::DBServer_PostgreSQL():
DBServer(uniset_conf()->getDBServer()),
db(new PostgreSQLInterface()),
PingTime(300000),
ReconnectTime(180000),
connect_ok(false),
......@@ -42,6 +42,7 @@ DBServer_PostgreSQL::DBServer_PostgreSQL():
qbufSize(200),
lastRemove(false)
{
db = make_shared<PostgreSQLInterface>();
// init();
if( getId() == DefaultObjectId )
{
......@@ -53,12 +54,8 @@ DBServer_PostgreSQL::DBServer_PostgreSQL():
//--------------------------------------------------------------------------------------------
DBServer_PostgreSQL::~DBServer_PostgreSQL()
{
if( db != NULL )
{
db->freeResult();
if( db )
db->close();
delete db;
}
}
//--------------------------------------------------------------------------------------------
void DBServer_PostgreSQL::sysCommand( const UniSetTypes::SystemMessage* sm )
......@@ -71,7 +68,6 @@ void DBServer_PostgreSQL::sysCommand( const UniSetTypes::SystemMessage* sm )
case SystemMessage::Finish:
{
activate = false;
db->freeResult();
db->close();
}
break;
......@@ -103,32 +99,27 @@ void DBServer_PostgreSQL::confirmInfo( const UniSetTypes::ConfirmMessage* cem )
<< " AND time='" << timeToString(cem->time, ":") <<" '"
<< " AND time_usec='" << cem->time_usec <<" '";
if( ulog.debugging(DBLEVEL) )
ulog[DBLEVEL] << myname << "(update_confirm): " << data.str() << endl;
dblog << myname << "(update_confirm): " << data.str() << endl;
if( !writeToBase(data.str()) )
{
if( ulog.debugging(Debug::CRIT) )
ulog[Debug::CRIT] << myname << "(update_confirm): db error: "<< db->error() << endl;
ucrit << myname << "(update_confirm): db error: "<< db->error() << endl;
db->freeResult();
}
}
catch( Exception& ex )
catch( const Exception& ex )
{
if( ulog.debugging(Debug::CRIT) )
ulog[Debug::CRIT] << myname << "(update_confirm): " << ex << endl;
ucrit << myname << "(update_confirm): " << ex << endl;
}
catch( ... )
{
if( ulog.debugging(Debug::CRIT) )
ulog[Debug::CRIT] << myname << "(update_confirm): catch..." << endl;
ucrit << myname << "(update_confirm): catch..." << endl;
}
}
//--------------------------------------------------------------------------------------------
bool DBServer_PostgreSQL::writeToBase( const string& query )
{
if( ulog.debugging(DBLogInfoLevel) )
ulog[DBLogInfoLevel] << myname << "(writeToBase): " << query << endl;
dblog << myname << "(writeToBase): " << query << endl;
if( !db || !connect_ok )
{
......@@ -143,8 +134,7 @@ bool DBServer_PostgreSQL::writeToBase( const string& query )
qlost = qbuf.front();
qbuf.pop();
if( ulog.debugging(Debug::CRIT) )
ulog[Debug::CRIT] << myname << "(writeToBase): DB not connected! buffer(" << qbufSize
ucrit << myname << "(writeToBase): DB not connected! buffer(" << qbufSize
<< ") overflow! lost query: " << qlost << endl;
}
......@@ -173,12 +163,7 @@ void DBServer_PostgreSQL::flushBuffer()
{
if(!db->insertAndSaveRowid( qbuf.front() ))
{
if(ulog.debugging(Debug::CRIT) )
{
string err(db->error());
ulog[Debug::CRIT] << myname << "(writeToBase): error: " << err <<
" lost query: " << qbuf.front() << endl;
}
ucrit << myname << "(writeToBase): error: " << db->error() << " lost query: " << qbuf.front() << endl;
}
qbuf.pop();
......@@ -210,31 +195,28 @@ void DBServer_PostgreSQL::sensorInfo( const UniSetTypes::SensorMessage *si )
<< si->value << "," // value
<< si->node << ")"; // node
if( ulog.debugging(DBLEVEL) )
ulog[DBLEVEL] << myname << "(insert_main_history): " << data.str() << endl;
dblog << myname << "(insert_main_history): " << data.str() << endl;
if( !writeToBase(data.str()) )
{
if( ulog.debugging(Debug::CRIT) )
ulog[Debug::CRIT] << myname << "(insert) sensor msg error: "<< db->error() << endl;
ucrit << myname << "(insert) sensor msg error: "<< db->error() << endl;
db->freeResult();
}
}
catch( Exception& ex )
catch( const Exception& ex )
{
ulog[Debug::CRIT] << myname << "(insert_main_history): " << ex << endl;
ucrit << myname << "(insert_main_history): " << ex << endl;
}
catch( ... )
{
ulog[Debug::CRIT] << myname << "(insert_main_history): catch ..." << endl;
ucrit << myname << "(insert_main_history): catch ..." << endl;
}
}
//--------------------------------------------------------------------------------------------
void DBServer_PostgreSQL::init_dbserver()
{
DBServer::init_dbserver();
if( ulog.debugging(DBLogInfoLevel) )
ulog[DBLogInfoLevel] << myname << "(init): ..." << endl;
dblog << myname << "(init): ..." << endl;
if( connect_ok )
{
......@@ -260,7 +242,7 @@ void DBServer_PostgreSQL::init_dbserver()
UniXML::iterator it(node);
ulog[DBLogInfoLevel] << myname << "(init): init connection.." << endl;
dblog << myname << "(init): init connection.." << endl;
string dbname(conf->getProp(node,"dbname"));
string dbnode(conf->getProp(node,"dbnode"));
string user(conf->getProp(node,"dbuser"));
......@@ -283,27 +265,19 @@ void DBServer_PostgreSQL::init_dbserver()
if( dbnode.empty() )
dbnode = "localhost";
if( ulog.debugging(DBLogInfoLevel) )
ulog[DBLogInfoLevel] << myname << "(init): connect dbnode=" << dbnode
dblog << myname << "(init): connect dbnode=" << dbnode
<< "\tdbname=" << dbname
<< " pingTime=" << PingTime
<< " ReconnectTime=" << ReconnectTime << endl;
if( !db->connect(dbnode, user, password, dbname) )
{
// ostringstream err;
if( ulog.debugging(Debug::CRIT) )
ulog[Debug::CRIT] << myname
<< "(init): DB connection error: "
<< db->error() << endl;
// throw Exception( string(myname+"(init): не смогли создать соединение с БД "+db->error()) );
uwarn << myname << "(init): DB connection error: " << db->error() << endl;
askTimer(DBServer_PostgreSQL::ReconnectTimer,ReconnectTime);
}
else
{
cout<<"DB CONNECT OK"<<endl;
if( ulog.debugging(DBLogInfoLevel) )
ulog[DBLogInfoLevel] << myname << "(init): connect [OK]" << endl;
dblog << myname << "(init): connect [OK]" << endl;
connect_ok = true;
askTimer(DBServer_PostgreSQL::ReconnectTimer,0);
askTimer(DBServer_PostgreSQL::PingTimer,PingTime);
......@@ -314,15 +288,14 @@ void DBServer_PostgreSQL::init_dbserver()
}
}
//--------------------------------------------------------------------------------------------
void DBServer_PostgreSQL::createTables( PostgreSQLInterface *db )
void DBServer_PostgreSQL::createTables( std::shared_ptr<PostgreSQLInterface>& db )
{
auto conf = uniset_conf();
UniXML_iterator it( conf->getNode("Tables") );
if(!it)
{
if( ulog.debugging(Debug::CRIT) )
ulog[Debug::CRIT] << myname << ": section <Tables> not found.."<< endl;
ucrit << myname << ": section <Tables> not found.."<< endl;
throw Exception();
}
......@@ -330,12 +303,13 @@ void DBServer_PostgreSQL::createTables( PostgreSQLInterface *db )
{
if( it.getName() != "comment" )
{
if( ulog.debugging(DBLogInfoLevel) )
ulog[DBLogInfoLevel] << myname << "(createTables): create " << it.getName() << endl;
ucrit << myname << "(createTables): create " << it.getName() << endl;
ostringstream query;
query << "CREATE TABLE " << conf->getProp(it,"name") << "(" << conf->getProp(it,"create") << ")";
if( !db->query(query.str()) && ulog.debugging(Debug::CRIT) )
ulog[Debug::CRIT] << myname << "(createTables): error: \t\t" << db->error() << endl;
if( !db->query(query.str()) )
{
ucrit << myname << "(createTables): error: \t\t" << db->error() << endl;
}
}
}
}
......@@ -348,8 +322,7 @@ void DBServer_PostgreSQL::timerInfo( const UniSetTypes::TimerMessage* tm )
{
if( !db->ping() )
{
if( ulog.debugging(Debug::WARN) )
ulog[Debug::WARN] << myname << "(timerInfo): DB lost connection.." << endl;
uwarn << myname << "(timerInfo): DB lost connection.." << endl;
connect_ok = false;
askTimer(DBServer_PostgreSQL::PingTimer,0);
askTimer(DBServer_PostgreSQL::ReconnectTimer,ReconnectTime);
......@@ -357,16 +330,14 @@ void DBServer_PostgreSQL::timerInfo( const UniSetTypes::TimerMessage* tm )
else
{
connect_ok = true;
if( ulog.debugging(DBLogInfoLevel) )
ulog[DBLogInfoLevel] << myname << "(timerInfo): DB ping ok" << endl;
dblog << myname << "(timerInfo): DB ping ok" << endl;
}
}
break;
case DBServer_PostgreSQL::ReconnectTimer:
{
if( ulog.debugging(DBLogInfoLevel) )
ulog[DBLogInfoLevel] << myname << "(timerInfo): reconnect timer" << endl;
dblog << myname << "(timerInfo): reconnect timer" << endl;
if( db->isConnection() )
{
if( db->ping() )
......@@ -403,3 +374,33 @@ void DBServer_PostgreSQL::sigterm( int signo )
DBServer::sigterm(signo);
}
//--------------------------------------------------------------------------------------------
std::shared_ptr<DBServer_PostgreSQL> DBServer_PostgreSQL::init_dbserver( int argc, const char* const* argv,
const std::string& prefix )
{
auto conf = uniset_conf();
ObjectId ID = conf->getDBServer();
string name = conf->getArgParam("--" + prefix + "-name","");
if( !name.empty() )
{
ObjectId ID = conf->getObjectID(name);
if( ID == UniSetTypes::DefaultObjectId )
{
ucrit << "(DBServer_PostgreSQL): Unknown ObjectID for '" << name << endl;
return 0;
}
}
uinfo << "(DBServer_PostgreSQL): name = " << name << "(" << ID << ")" << endl;
return make_shared<DBServer_PostgreSQL>(ID,prefix);
}
// -----------------------------------------------------------------------------
void DBServer_PostgreSQL::help_print( int argc, const char* const* argv )
{
auto conf = uniset_conf();
cout << "Default: prefix='pgsql'" << endl;
cout << "--prefix-name objectID - ObjectID. Default: 'conf->getDBServer()'" << endl;
}
// -----------------------------------------------------------------------------
......@@ -11,16 +11,22 @@ class DBServer_PostgreSQL:
public DBServer
{
public:
DBServer_PostgreSQL( UniSetTypes::ObjectId id );
DBServer_PostgreSQL( UniSetTypes::ObjectId id, const std::string& prefix );
DBServer_PostgreSQL();
~DBServer_PostgreSQL();
virtual ~DBServer_PostgreSQL();
static const Debug::type DBLogInfoLevel = Debug::LEVEL9;
/*! глобальная функция для инициализации объекта */
static std::shared_ptr<DBServer_PostgreSQL> init_dbserver( int argc, const char* const* argv, const std::string& prefix="pgsql" );
/*! глобальная функция для вывода help-а */
static void help_print( int argc, const char* const* argv );
protected:
typedef std::map<int, std::string> DBTableMap;
virtual void initDB(PostgreSQLInterface *db){};
virtual void initDB( std::shared_ptr<PostgreSQLInterface>& db ){};
virtual void initDBTableMap(DBTableMap& tblMap){};
virtual void timerInfo( const UniSetTypes::TimerMessage* tm ) override;
......@@ -31,7 +37,7 @@ class DBServer_PostgreSQL:
bool writeToBase( const string& query );
virtual void init_dbserver();
void createTables( PostgreSQLInterface* db );
void createTables( std::shared_ptr<PostgreSQLInterface>& db );
inline const char* tblName(int key)
{
......@@ -45,7 +51,7 @@ class DBServer_PostgreSQL:
lastNumberOfTimer
};
PostgreSQLInterface *db;
std::shared_ptr<PostgreSQLInterface> db;
int PingTime;
int ReconnectTime;
bool connect_ok; /*! признак наличия соеднинения с сервером БД */
......
......@@ -4,25 +4,25 @@ else
UPGSQL_VER=@LIBVER@
lib_LTLIBRARIES = libUniSet2-postgresql.la
libUniSet2_postgresql_la_LDFLAGS = -version-info $(UPGSQL_VER)
libUniSet2_postgresql_la_SOURCES = PostgreSQLInterface.cc DBServer_PostgreSQL.cc
libUniSet2_postgresql_la_LIBADD = $(top_builddir)/lib/libUniSet2.la $(POSTGRESQL_LIBS)
libUniSet2_postgresql_la_CXXFLAGS = $(POSTGRESQL_CFLAGS)
bin_PROGRAMS = @PACKAGE@-postgresql-dbserver
@PACKAGE@_postgresql_dbserver_LDADD = libUniSet2-postgresql.la $(top_builddir)/lib/libUniSet2.la $(POSTGRESQL_LIBS)
@PACKAGE@_postgresql_dbserver_CXXFLAGS = $(POSTGRESQL_CFLAGS)
@PACKAGE@_postgresql_dbserver_SOURCES = main.cc
noinst_PROGRAMS = postgresql-test
postgresql_test_LDADD = libUniSet2-postgresql.la $(top_builddir)/lib/libUniSet2.la $(POSTGRESQL_LIBS)
postgresql_test_CXXFLAGS = $(POSTGRESQL_CFLAGS)
postgresql_test_SOURCES = test.cc
lib_LTLIBRARIES = libUniSet2-pgsql.la
libUniSet2_pgsql_la_LDFLAGS = -version-info $(UPGSQL_VER)
libUniSet2_pgsql_la_SOURCES = PostgreSQLInterface.cc DBServer_PostgreSQL.cc
libUniSet2_pgsql_la_LIBADD = $(top_builddir)/lib/libUniSet2.la $(PGSQL_LIBS)
libUniSet2_pgsql_la_CXXFLAGS = $(PGSQL_CFLAGS)
bin_PROGRAMS = @PACKAGE@-pgsql-dbserver
@PACKAGE@_pgsql_dbserver_LDADD = libUniSet2-pgsql.la $(top_builddir)/lib/libUniSet2.la $(PGSQL_LIBS)
@PACKAGE@_pgsql_dbserver_CXXFLAGS = $(PGSQL_CFLAGS)
@PACKAGE@_pgsql_dbserver_SOURCES = main.cc
noinst_PROGRAMS = pgsql-test
pgsql_test_LDADD = libUniSet2-pgsql.la $(top_builddir)/lib/libUniSet2.la $(PGSQL_LIBS)
pgsql_test_CXXFLAGS = $(PGSQL_CFLAGS)
pgsql_test_SOURCES = test.cc
# install
devel_include_HEADERS = *.h
devel_includedir = $(includedir)/@PACKAGE@/postgresql
devel_includedir = $(includedir)/@PACKAGE@/pgsql
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libUniSet2PostgreSQL.pc
......
......@@ -10,6 +10,7 @@ using namespace UniSetTypes;
PostgreSQLInterface::PostgreSQLInterface():
db(0),
result(0),
lastQ(""),
lastE(""),
queryok(false),
......
......@@ -7,5 +7,5 @@ Name: libUniSet2PostgreSQL
Description: Support library for libUniSet2PostgreSQL
Requires: libUniSet2 libpq
Version: @VERSION@
Libs: -L${libdir} -lUniSet2-postgresql
Cflags: -I${includedir}/@PACKAGE@ -I${includedir}/@PACKAGE@/postgresql
Libs: -L${libdir} -lUniSet2-pgsql
Cflags: -I${includedir}/@PACKAGE@ -I${includedir}/@PACKAGE@/pgsql
......@@ -6,63 +6,34 @@
using namespace UniSetTypes;
using namespace std;
// --------------------------------------------------------------------------
static void short_usage()
{
cout << "Usage: uniset-mysql-dbserver [--name ObjectId] [--confile configure.xml]\n";
}
// --------------------------------------------------------------------------
int main(int argc, char** argv)
{
try
{
if( argc > 1 && !strcmp(argv[1],"--help") )
{
short_usage();
DBServer_PostgreSQL::help_print(argc,argv);
return 0;
}
auto conf = uniset_init(argc,argv,"configure.xml");
ObjectId ID = conf->getDBServer();
// определяем ID объекта
string name = conf->getArgParam("--name");
if( !name.empty())
{
if( ID != UniSetTypes::DefaultObjectId )
{
ulog.warn() << "(DBServer::main): переопределяем ID заданнй в "
<< conf->getConfFileName() << endl;
}
ID = conf->oind->getIdByName(conf->getServicesSection()+"/"+name);
if( ID == UniSetTypes::DefaultObjectId )
{
cerr << "(DBServer::main): идентификатор '" << name
<< "' не найден в конф. файле!"
<< " в секции " << conf->getServicesSection() << endl;
return 1;
}
auto dbs = DBServer_PostgreSQL::init_dbserver(argc,argv);
auto act = UniSetActivator::Instance();
act->add(dbs);
act->run(false);
}
else if( ID == UniSetTypes::DefaultObjectId )
catch( const Exception& ex )
{
cerr << "(DBServer::main): Не удалось определить ИДЕНТИФИКАТОР сервера" << endl;
short_usage();
return 1;
}
DBServer_PostgreSQL dbs(ID);
UniSetActivatorPtr act = UniSetActivator::Instance();
act->addObject(static_cast<class UniSetObject*>(&dbs));
act->run(false);
cerr << "(DBServer_PosgreSQL::main): " << ex << endl;
}
catch(Exception& ex)
catch( std::exception& ex )
{
cerr << "(DBServer::main): " << ex << endl;
cerr << "(DBServer_PosgreSQL::main): " << ex.what() << endl;
}
catch(...)
{
cerr << "(DBServer::main): catch ..." << endl;
cerr << "(DBServer_PosgreSQL::main): catch ..." << endl;
}
return 0;
......
......@@ -2,6 +2,6 @@
ulimit -Sc 1000000
uniset2-start.sh -f ./uniset2-postgresql-dbserver --confile test.xml --name DBServer1 \
uniset2-start.sh -f ./uniset2-pgsql-dbserver --confile test.xml --name DBServer1 \
--ulog-add-levels info,crit,warn,level9,system \
--dbserver-buffer-size 100
......@@ -44,7 +44,7 @@ int main(int argc, char** argv)
db.close();
}
catch( Exception& ex )
catch( const Exception& ex )
{
cerr << "(test): " << ex << endl;
}
......
......@@ -19,6 +19,14 @@ extensions/DBServer-SQLite/SQLiteInterface.cc
extensions/DBServer-SQLite/SQLiteInterface.h
extensions/DBServer-SQLite/test.cc
extensions/DBServer-SQLite/test.xml
extensions/DBServer-PostgreSQL/DBServer_PostgreSQL.cc
extensions/DBServer-PostgreSQL/DBServer_PostgreSQL.h
extensions/DBServer-PostgreSQL/libUniSet2PostgreSQL.pc.in
extensions/DBServer-PostgreSQL/main.cc
extensions/DBServer-PostgreSQL/Makefile.am
extensions/DBServer-PostgreSQL/PostgreSQLInterface.cc
extensions/DBServer-PostgreSQL/PostgreSQLInterface.h
extensions/DBServer-PostgreSQL/test.cc
extensions/include/Calibration.h
extensions/include/ComediInterface.h
extensions/include/DigitalFilter.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment