Skip to content

Commit 5ad2b6f

Browse files
authored
add field data type
linked to this pull request #3287
1 parent a98510c commit 5ad2b6f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

system/Database/Postgre/Result.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ public function getFieldData(): array
9292
{
9393
$retVal[$i] = new \stdClass();
9494
$retVal[$i]->name = pg_field_name($this->resultID, $i);
95-
$retVal[$i]->type = pg_field_type($this->resultID, $i);
95+
$retVal[$i]->type = pg_field_type_oid($this->resultID, $i);
96+
$retVal[$i]->type_name = pg_field_type($this->resultID, $i);
9697
$retVal[$i]->max_length = pg_field_size($this->resultID, $i);
98+
$retVal[$i]->length = $retVal[$i]->max_length;
9799
// $retVal[$i]->primary_key = (int)($fieldData[$i]->flags & 2);
98100
// $retVal[$i]->default = $fieldData[$i]->def;
99101
}

0 commit comments

Comments
 (0)