Fix kexi build with libpqxx 7

Signed-off-by: François Andriot <francois.andriot@free.fr>
(cherry picked from commit 73d1fecdcf)
r14.0.x
François Andriot 4 years ago committed by Michele Calgaro
parent 9b24b3b16d
commit 401e94a34c
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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;
}

Loading…
Cancel
Save