|  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.0 ± 0.8
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 20:01:29 2024 UTC