2015-04-03 84 views
0

我使用PostgreSQL作为我的后端数据库。我正在通过PostgreSQL odbc驱动程序(Unicode x64)从我的应用程序运行查询。当我看到PostgreSQL日志时,它实际上运行了两个查询。运行额外查询的postgresql odbc驱动程序

我执行的查询:

2015-04-03 16:54:24 IST00000LOG: statement: 
select n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod, c.relhasoids from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.oid = 274738) inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname, attnum 

我使用PostgreSQL 9.3.5与Postgres的-ODBC驱动程序9.03.02.00

对于每个查询我运行的PostgreSQL每次运行第二个查询。

如何禁用第二个查询的运行。

预先感谢

回答

0

这是最有可能被你的框架生成的第二查询,它被用于获取有关结果集的元数据。很可能会自动转换数据。为了停止它的生成,你将需要咨询你正在使用的框架,看看是否有阻止它。但是请注意,如果可以禁用该功能,那么它很有可能会破坏某些内容,因为您将不再拥有关于结果集的元数据。