SQL tests: Fix for PostgreSQL 12 and above

The 'WITH OIDS' was deprecated some time ago and removed with
PostgreSQL 12 so we have to adjust our test table creations. Don't know
why it was used in the first place at all.

Pick-to: 6.2 6.4 6.5
Change-Id: I6e18ac01e64368b1dd64e02bcb75fa70e05467a3
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Christian Ehrlicher 2023-01-07 14:05:42 +01:00
parent 51e5a2376a
commit 87662bcf10

View File

@ -407,7 +407,7 @@ void tst_QSqlQuery::createTestTables(QSqlDatabase db)
if (dbType == QSqlDriver::PostgreSQL) {
QVERIFY_SQL(q, exec(QLatin1String(
"create table %1 (id serial NOT NULL, t_varchar varchar(20), "
"t_char char(20), primary key(id)) WITH OIDS").arg(qtest)));
"t_char char(20), primary key(id))").arg(qtest)));
} else {
QVERIFY_SQL(q, exec(QLatin1String(
"create table %1 (id int %2 NOT NULL, t_varchar varchar(20), "