首页 文章

postgresql odbc驱动程序运行额外的查询

提问于
浏览
0

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

我执行的查询:

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运行第二个查询 .

如何禁用此第二个查询运行 .

预先感谢

1 回答

  • 0

    第二个查询很可能是由您的框架生成的,它用于获取有关结果集的元数据 . 更有可能进行自动数据转换 . 为了阻止它的生成,你需要咨询你正在使用的框架,看看是否有任何阻止它 . 但请注意,如果可以禁用它,很可能会破坏某些内容,因为您将不再拥有有关结果集的元数据 .

相关问题