Home » Database » DB » Bug #6329
tableInfo() for postgres driver returns -1 as field length for type varchar
Details
| Submitted | 2005-12-22 14:59 UTC |
|---|---|
| From | ccasal at centrixpr dot com |
| Status | Wont fix |
| Package | DB |
| PHP Version | 4.3.9 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-12-22 14:59 UTC] ccasal at centrixpr dot com
Description:
------------
pear DB 1.7.6 stable
tableInfo() uses pg_fieldsize to determine length of field on table and pg_fieldsize returns the internal storage size of the postgres field, not the actual maximum length of field.
This causes a len = -1 on the array structure which tableInfo creates.
pg_fieldsize reference
http://www.php.net/manual/en/function.pg-field-size.php
Test script:
---------------
DB/pgsql.php line 938
-------------------
'len' => @pg_fieldsize($id, $i),