Skip to content

Commit c3d2490

Browse files
committed
Fix money column results with ext-pgsql
1 parent f52cc35 commit c3d2490

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PgSqlResultSet.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,12 @@ private function cast(int $oid, string $value)
130130
switch ($oid) {
131131
case 700: // float4
132132
case 701: // float8
133-
case 790: // money
134133
case 1700: // numeric
135134
return (float) $value;
136135

136+
case 790:
137+
return $value; // money includes currency symbol as string.
138+
137139
default: // Cast all other numeric types to an integer.
138140
return (int) $value;
139141
}

0 commit comments

Comments
 (0)