|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #64542 PDO/pgsql get_column_meta() do DB request on every call
Submitted: 2013-03-28 14:36 UTC Modified: 2017-04-24 19:20 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: vaksenov at avito dot ru Assigned:
Status: Open Package: PDO PgSQL
PHP Version: 5.4.13 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
40 + 8 = ?
Subscribe to this entry?

 [2013-03-28 14:36 UTC] vaksenov at avito dot ru
PDO/pgsql function get_column_meta() return column type id.
But also it return "native_type".
To get "native_type" it make a sql-request: "SELECT TYPNAME FROM PG_TYPE WHERE OID=%d" for each column.

But for our project numeric value of "column type id" is enough.
Requesting "native_type" just slowing down system performance.

So, this is workaround: 
Add new statement option "PGSQL_ATTR_DISABLE_RESOLV_NATIVE_TYPE_ON_META", which prevents resolving "native_type".


patch_pdo_meta.diff (last revision 2013-03-28 14:37 UTC by vaksenov at avito dot ru)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-24 19:20 UTC]
-Package: PDO related +Package: PDO PgSQL
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Sep 17 08:01:27 2019 UTC