Postgres DB driver returns bogus primary key in field_data() |
|||
|---|---|---|---|
| Date: | 09/11/2008 | Severity: | Minor |
| Status: | Resolved | Reporter: | dfau |
| Version: | 1.6.3 | ||
| Keywords: | Libraries, Database Class | ||
Description
drivers/postgre/postgre_result.php sets primary_key in field_data() for the first field in the table irrespective of whether it is the primary key or not.
The manual states that not all drivers provide meta-data; it would be better for this driver to provide nothing rather than something that is incorrect.
Other drivers that do not interrogate field data return zero. The Postgres driver should follow this behaviour for consistency.
Code Sample
$F->primary_key = $i == 0;
