Skip to content

Commit 4124f7d

Browse files
Dmitriy Chugunovelprans
Dmitriy Chugunov
authored andcommitted
Decode numeric zeros with correct scale
1 parent 3223b1b commit 4124f7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

asyncpg/protocol/codecs/numeric.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ cdef numeric_decode_binary(ConnectionSettings settings, FastReadBuffer buf):
161161

162162
if num_pgdigits == 0:
163163
# Zero
164-
return _Dec()
164+
return _Dec('0e-' + str(dscale))
165165

166166
pgdigit0 = hton.unpack_int16(buf.read(2))
167167
if weight >= 0:

0 commit comments

Comments
 (0)