# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/qt3/hotfix-postgresql12.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Fix the PostgreSQL driver build with PostgreSQL >= 12. --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -58,7 +58,12 @@ # undef errno #endif #define errno qt_psql_errno +// PostgreSQL >= 11: OIDs only, the full header conflicts with Qt's Param +#if __has_include() +#include +#else #include +#endif #undef errno #ifdef open # undef open @@ -147,8 +152,10 @@ static QVariant::Type qDecodePSQLType( i case FLOAT8OID : type = QVariant::Double; break; +#ifdef ABSTIMEOID // removed in PostgreSQL 12 case ABSTIMEOID : case RELTIMEOID : +#endif case DATEOID : type = QVariant::Date; break;