From 401e94a34c8adc7a0f6b771ad70187ba00fb72c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Wed, 10 Jun 2020 00:09:59 +0200 Subject: Fix kexi build with libpqxx 7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Andriot (cherry picked from commit 73d1fecdcfcb4cb62d506ffbbf9f079800f0be86) --- kexi/migration/pqxx/pqxxmigrate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp index 119f2f65..5b62ffcc 100644 --- a/kexi/migration/pqxx/pqxxmigrate.cpp +++ b/kexi/migration/pqxx/pqxxmigrate.cpp @@ -92,7 +92,11 @@ bool PqxxMigrate::drv_readTableSchema( for (uint i = 0; i < (uint)m_res->columns(); i++) { TQString fldName(m_res->column_name(i)); +#if PQXX_VERSION_MAJOR < 7 KexiDB::Field::Type fldType = type(m_res->column_type(i), fldName); +#else + KexiDB::Field::Type fldType = type(m_res->column_type(m_res->column_name(i)), fldName); +#endif TQString fldID( KexiUtils::string2Identifier(fldName) ); const pqxx::oid toid = tableOid(originalName); if (toid==0) @@ -249,7 +253,9 @@ bool PqxxMigrate::drv_disconnect() { if (m_conn) { +#if PQXX_VERSION_MAJOR < 7 m_conn->disconnect(); +#endif delete m_conn; m_conn = 0; } -- cgit v1.2.1