diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f6af893..c6cd2847 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ add_definitions("-DSOURCE_PATH_SIZE=${SOURCE_PATH_SIZE}") -add_definitions(-DENABLE_CURL -DADAGUC_USE_GDAL -DADAGUC_USE_SQLITE -DADAGUC_USE_POSTGRESQL -DADAGUC_USE_WEBP) +add_definitions(-DENABLE_CURL -DADAGUC_USE_GDAL -DADAGUC_USE_SQLITE -DADAGUC_USE_WEBP) diff --git a/adagucserverEC/CDBAdapterPostgreSQL.cpp b/adagucserverEC/CDBAdapterPostgreSQL.cpp index b661d8de..7694b4ca 100644 --- a/adagucserverEC/CDBAdapterPostgreSQL.cpp +++ b/adagucserverEC/CDBAdapterPostgreSQL.cpp @@ -24,7 +24,6 @@ ******************************************************************************/ #include "CDBAdapterPostgreSQL.h" -#ifdef ADAGUC_USE_POSTGRESQL #include #include "CDebugger.h" @@ -257,9 +256,6 @@ CDBStore::Store *CDBAdapterPostgreSQL::getClosestDataTimeToSystemTime(const char }; CDBStore::Store *CDBAdapterPostgreSQL::getFilesForIndices(CDataSource *dataSource, size_t *start, size_t *count, ptrdiff_t *, int) { -#ifdef MEASURETIME - StopWatch_Stop(">CDBAdapterPostgreSQL::getFilesForIndices"); -#endif #ifdef CDBAdapterPostgreSQL_DEBUG CDBDebug("getFilesForIndices"); #endif @@ -1135,5 +1131,3 @@ int CDBAdapterPostgreSQL::addFilesToDataBase() { #endif return 0; } - -#endif diff --git a/adagucserverEC/CDBAdapterPostgreSQL.h b/adagucserverEC/CDBAdapterPostgreSQL.h index 598aadbf..ea6ec0da 100644 --- a/adagucserverEC/CDBAdapterPostgreSQL.h +++ b/adagucserverEC/CDBAdapterPostgreSQL.h @@ -23,7 +23,6 @@ * ******************************************************************************/ -#ifdef ADAGUC_USE_POSTGRESQL #include "CDBAdapter.h" #include "CDebugger.h" #include "CPGSQLDB.h" @@ -76,4 +75,3 @@ class CDBAdapterPostgreSQL : public CDBAdapter { int setFileTimeStamp(const char *tablename, const char *file, const char *dimvalue, int dimindex, const char *filedate, GeoOptions *geoOptions); int addFilesToDataBase(); }; -#endif \ No newline at end of file diff --git a/adagucserverEC/CDBFactory.cpp b/adagucserverEC/CDBFactory.cpp index 84ec1d6e..bd4d7885 100644 --- a/adagucserverEC/CDBFactory.cpp +++ b/adagucserverEC/CDBFactory.cpp @@ -44,12 +44,8 @@ CDBAdapter *CDBFactory::getDBAdapter(CServerConfig::XMLE_Configuration *cfg) { CDBError("SQLITE is not compiled for ADAGUC, not available!"); #endif } else { -// CDBDebug("Using postgresql"); -#ifdef ADAGUC_USE_POSTGRESQL + // CDBDebug("Using postgresql"); staticCDBAdapter = new CDBAdapterPostgreSQL(); -#else - CDBError("POSTGRESQL is not compiled for ADAGUC, not available!"); -#endif } staticCDBAdapter->setConfig(cfg); diff --git a/adagucserverEC/CPGSQLDB.cpp b/adagucserverEC/CPGSQLDB.cpp index 55761f6e..a0e6d26c 100644 --- a/adagucserverEC/CPGSQLDB.cpp +++ b/adagucserverEC/CPGSQLDB.cpp @@ -22,7 +22,7 @@ * limitations under the License. * ******************************************************************************/ -#ifdef ADAGUC_USE_POSTGRESQL + #include "CPGSQLDB.h" const char *CPGSQLDB::className = "CPGSQLDB"; void CPGSQLDB::clearResult() { @@ -225,4 +225,3 @@ CDBStore::Store *CPGSQLDB::queryToStore(const char *pszQuery, bool throwExceptio return store; ; } -#endif \ No newline at end of file diff --git a/adagucserverEC/CPGSQLDB.h b/adagucserverEC/CPGSQLDB.h index 64da5312..c9148bdb 100644 --- a/adagucserverEC/CPGSQLDB.h +++ b/adagucserverEC/CPGSQLDB.h @@ -22,7 +22,7 @@ * limitations under the License. * ******************************************************************************/ -#ifdef ADAGUC_USE_POSTGRESQL + #ifndef CPGSQLDB_H #define CPGSQLDB_H #include @@ -71,5 +71,3 @@ class CPGSQLDB { CDBStore::Store *queryToStore(const char *pszQuery) { return queryToStore(pszQuery, false); } }; #endif - -#endif