[Interest] Using Postgres Views

Petric Frank pfrank at gmx.de
Sun Jun 18 21:22:05 CEST 2017


Hello,

don't know what happened - rebooting the machine running the SQL-server got it working 
again ...

regards
  Petric

Am Sonntag 18 Juni 2017, 05:45:29 schrieb Petric Frank:
> Hello,
> 
> i want to use PostgrSQL views from QSqlTableModel. Here this does not work.
> The error QSqlTableModel.lastError.text () displays:
>   Unable to find table <view name>.
> 
> Checking
>   QSqlDatabase::tables ()
> 
> only return the tables but not the views defined in the database. Is that a
> limnitaion/bug ?
> 
> As result neither QSqlTableModel, QSqlQueryModel and QSqlQuery are able to
> access the views.
> 
> Using the psql command line interface (same credentials) works. Tested with
> sql query: select * from <view name>;
> 
> Environment:
> 
> OS: Gentoo Linux (stable)
> Linux Kernel 4.9.16
> PostgreSQL 9.5.7
> Qt 5.6.2
> gcc 5.4.0
> 
> 
> Any hints ?
> 
> kind regards
>   Petric Frank

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170618/3f61e90e/attachment.html>


More information about the Interest mailing list