PYQT6使用的确切的PostgreSQL驱动程序是什么?
如何确定PYQT6使用的确切的PostgreSQL驱动程序? QPSQL是QT的东西,没有关于配置选项的文档,因此我猜这只是真正驱动程序的包装器。
如QSQLDATABASE DOC所示,没有“ PostgreSQL驱动程序”之类的东西。
Postgres版本12文档列出了以下“外部项目”作为可能的驱动程序:DBD :: PG,JDBC,LIBPQXX,NODE-POSTGRES,NPGSQL,PGTCL,PGTCL,PGTCLNG,PQ,PSQLODBC,PSYCOPG,PSYCOPG。还有两个本地驱动程序:libpq,ecpg。
尽管未在版本12个文档中列出,但ODBC有几种变体,分为单层和多层类型。
Postgres Doc指出,PSQLODBC是“官方的PostgreSQL ODBC驱动程序”,但这并不意味着PYQT6正在使用它。
QT可能不会致力于特定的驱动程序,因为他们可能想更改驱动程序实现而无需通知。但是,我想知道我有什么,以便我可以调整它的选择。更好的是,如果我不喜欢一个QT提供的话,我想使用其他驱动程序。 QT有一个部分,“带有特定驱动程序的QT”;对于PYQT6程序员来说,这不是必需的,而且尚不清楚使用静态方法RegistersQldriver()是否会进入PYQT6。 QSQLDRIVER DOC具有与HasFeature()方法一起使用的一堆枚举;这很有用,但与操纵驱动程序参数不同。 JDBC驱动程序有很多选项,这些选项在Postgres文档中被列举;我希望能够检索任何驱动程序QT工具的类似列表。
请任何帮助。
How can I determine the exact PostgreSQL driver used by PyQt6? QPSQL is a Qt thingy for which there is no documentation as to configuration options, so I'm guessing it's just a wrapper for a real driver.
There is no such thing as a "PostgreSQL Driver", as shown in the QSqlDatabase doc.
Postgres version 12 docs lists the following "external projects" as possible drivers: DBD::Pg, JDBC, libpqxx, node-postgres, Npgsql, pgtcl, pgtclng, pq, psqlODBC, psycopg. There are also two native drivers: libpq, ECPG.
Though not listed in the version 12 docs, there are several variations of ODBC, divided into single-tier and multi-tier types.
A Postgres doc states that psqlODBC is the "official PostgreSQL ODBC driver", but that doesn't mean that PyQt6 is using it.
Possibly Qt won't commit to a specific driver because they may want to change driver implementation without notice. Nevertheless, I'd like to know what I have so I can tweak its options. Even better, I'd like to use a different driver if I don't like the one Qt provides. Qt has a section, "Compile Qt with a specific driver"; that should not be necessary for a PyQt6 programmer, and it is not clear whether such a compiled thing would find its way into PyQt6 with the static method, registerSqlDriver(). The QSqlDriver doc has a bunch of enums used with the hasFeature() method; this is useful, but it's not the same as manipulating driver parameters. The JDBC driver has a whole raft of options which are enumerated in the Postgres docs; I'd like to be able to retrieve a similar list for whatever driver Qt implements.
Any help, please.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
qt使用
libpq
QSQLPSQL
插件的驱动程序。Qt uses
libpq
driver forqsqlpsql
plugin.