Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 696870 - dev-qt/qtsql-5.12.5-r1 w/ >=dev-db/postgresql-12.0: QSqlTableModel::select() fails: pg_attrdef.adsrc does not exist
Summary: dev-qt/qtsql-5.12.5-r1 w/ >=dev-db/postgresql-12.0: QSqlTableModel::select() ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://bugreports.qt.io/browse/QTBUG...
Whiteboard:
Keywords: PATCH
: 698034 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-06 19:19 UTC by Chris Mayo
Modified: 2019-10-26 22:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to qtsql (adsrc.patch,713 bytes, patch)
2019-10-06 19:19 UTC, Chris Mayo
Details | Diff
qtsql-5.12.5-postgresql-12.patch (qtsql-5.12.5-postgresql-12.patch,4.46 KB, patch)
2019-10-19 21:12 UTC, Andreas Sturmlechner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mayo 2019-10-06 19:19:16 UTC
Created attachment 592010 [details, diff]
Patch to qtsql

QSqlTableModel tries to select pg_attrdef.adsrc:

https://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/sqldrivers/psql/qsql_psql.cpp?id=3a1613c2276a30ccf101e7349d89611cf5d86e6a#n1444

but it was removed in PostgreSQL 12.0:

https://www.postgresql.org/docs/12/release-12.html


Patch attached
DCO_SIGNED_OFF_BY="Chris Mayo <aklhfex@gmail.com>"

Submitted by me on upstream bug:
https://bugreports.qt.io/browse/QTBUG-79033
Comment 1 Andreas Sturmlechner gentoo-dev 2019-10-19 08:56:50 UTC
*** Bug 698034 has been marked as a duplicate of this bug. ***
Comment 2 Andreas Sturmlechner gentoo-dev 2019-10-19 21:12:48 UTC
Created attachment 593336 [details, diff]
qtsql-5.12.5-postgresql-12.patch

untested crap for brave souls
Comment 3 Larry the Git Cow gentoo-dev 2019-10-19 21:43:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/qt.git/commit/?id=5e2f02e82905794314667eb0fcd657af2abd0a47

commit 5e2f02e82905794314667eb0fcd657af2abd0a47
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-10-19 21:41:55 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-10-19 21:41:55 +0000

    dev-qt/qtsql: Fix build against PostgreSQL 12.0
    
    Clean backport from qtsql 5.14 branch.
    
    Bug: https://bugs.gentoo.org/696870
    Package-Manager: Portage-2.3.77, Repoman-2.3.17
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../qtsql/files/qtsql-5.13.1-postgresql-12.patch   | 97 ++++++++++++++++++++++
 dev-qt/qtsql/qtsql-5.13.1.ebuild                   |  5 ++
 dev-qt/qtsql/qtsql-5.13.9999.ebuild                |  5 ++
 3 files changed, 107 insertions(+)
Comment 4 Nils Freydank 2019-10-26 09:26:15 UTC
Hi,

I tested the second patch by asturm against qtsql-5.12.5-r1::gentoo with postgresql-12.0::gentoo and the akonadi bug is now gone (was: second start with akonadi fails if akonadi uses pg backend and =postgres-5.12.0).

Huge thanks to both of you!
Comment 5 Larry the Git Cow gentoo-dev 2019-10-26 10:52:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6519752b4d6e8609db3a09a2a3da94d329d443e2

commit 6519752b4d6e8609db3a09a2a3da94d329d443e2
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-10-19 21:12:07 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-10-26 10:52:19 +0000

    dev-qt/qtsql: Fix build against PostgreSQL 12.0
    
    Backport from qtsql 5.14 branch.
    
    Tested-by: Nils Freydank <holgersson@posteo.de>
    Bug: https://bugs.gentoo.org/696870
    Package-Manager: Portage-2.3.77, Repoman-2.3.17
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../qtsql/files/qtsql-5.12.5-postgresql-12.patch   | 97 ++++++++++++++++++++++
 dev-qt/qtsql/qtsql-5.12.5-r2.ebuild                | 62 ++++++++++++++
 2 files changed, 159 insertions(+)