: parameters_(parameters) {
// Validate the schema version first.
- std::pair<uint32_t, uint32_t> code_version(PG_SCHEMA_VERSION_MAJOR,
- PG_SCHEMA_VERSION_MINOR);
+ std::pair<uint32_t, uint32_t> code_version(PGSQL_SCHEMA_VERSION_MAJOR,
+ PGSQL_SCHEMA_VERSION_MINOR);
std::pair<uint32_t, uint32_t> db_version = getVersion();
if (code_version != db_version) {
isc_throw(DbOpenError,
: parameters_(parameters) {
// Validate schema version first.
- std::pair<uint32_t, uint32_t> code_version(PG_SCHEMA_VERSION_MAJOR,
- PG_SCHEMA_VERSION_MINOR);
+ std::pair<uint32_t, uint32_t> code_version(PGSQL_SCHEMA_VERSION_MAJOR,
+ PGSQL_SCHEMA_VERSION_MINOR);
std::pair<uint32_t, uint32_t> db_version = getVersion();
if (code_version != db_version) {
isc_throw(DbOpenError,
std::string
PgSqlLeaseMgr::getDBVersion() {
std::stringstream tmp;
- tmp << "PostgreSQL backend " << PG_SCHEMA_VERSION_MAJOR;
- tmp << "." << PG_SCHEMA_VERSION_MINOR;
+ tmp << "PostgreSQL backend " << PGSQL_SCHEMA_VERSION_MAJOR;
+ tmp << "." << PGSQL_SCHEMA_VERSION_MINOR;
tmp << ", library " << PQlibVersion();
return (tmp.str());
}
// Check version
pair<uint32_t, uint32_t> version;
ASSERT_NO_THROW(version = lmptr_->getVersion());
- EXPECT_EQ(PG_SCHEMA_VERSION_MAJOR, version.first);
- EXPECT_EQ(PG_SCHEMA_VERSION_MINOR, version.second);
+ EXPECT_EQ(PGSQL_SCHEMA_VERSION_MAJOR, version.first);
+ EXPECT_EQ(PGSQL_SCHEMA_VERSION_MINOR, version.second);
}
////////////////////////////////////////////////////////////////////////////////
namespace db {
/// @brief Define PostgreSQL backend version: 6.1
-const uint32_t PG_SCHEMA_VERSION_MAJOR = 6;
-const uint32_t PG_SCHEMA_VERSION_MINOR = 1;
+const uint32_t PGSQL_SCHEMA_VERSION_MAJOR = 6;
+const uint32_t PGSQL_SCHEMA_VERSION_MINOR = 1;
// Maximum number of parameters that can be used a statement
// @todo This allows us to use an initializer list (since we can't
-// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2020 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
cmd << " sh " << DATABASE_SCRIPTS_DIR << "/pgsql/wipe_data.sh";
// Add expected schema version as the wipe script's first argument.
- cmd << " " << PG_SCHEMA_VERSION_MAJOR << "." << PG_SCHEMA_VERSION_MINOR;
+ cmd << " " << PGSQL_SCHEMA_VERSION_MAJOR << "." << PGSQL_SCHEMA_VERSION_MINOR;
// Now add command line arguments for psql.
cmd << " --set ON_ERROR_STOP=1 -A -t -h localhost -q -U keatest -d keatest";
-// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2020 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// <TEST_ADMIN_SCRIPTS_DIR>/pgsql/wipe_data.sh
///
/// This will fail if there is no schema, if the existing schema
-/// version is incorrect (i.e. does not match PG_SCHEMA_VERSION_MAJOR
-/// and PG_SCHEMA_VERSION_MINOR), or a SQL error occurs. Otherwise,
+/// version is incorrect (i.e. does not match PGSQL_SCHEMA_VERSION_MAJOR
+/// and PGSQL_SCHEMA_VERSION_MINOR), or a SQL error occurs. Otherwise,
/// the script is should delete all transient data, leaving intact
/// reference tables.
///