Req #64542 [NEW]: PDO/pgsql get_column_meta() do DB request on every call
| From: | vaksenov at avito dot ru | Date: | Thu, 28 Mar 2013 14:36:36 +0000 |
| Subject: | Req #64542 [NEW]: PDO/pgsql get_column_meta() do DB request on every call | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-178166@lists.php.net to get a copy of this message | ||
From: vaksenov at avito dot ru
Operating system: Linux
PHP version: 5.4.13
Package: PDO related
Bug Type: Feature/Change Request
Bug description:PDO/pgsql get_column_meta() do DB request on every call
Description:
------------
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".
--
Edit bug report at https://bugs.php.net/bug.php?id=64542&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64542&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64542&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64542&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64542&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64542&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64542&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64542&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64542&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64542&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64542&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64542&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64542&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64542&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64542&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64542&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64542&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64542&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64542&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64542&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64542&r=mysqlcfg