FG
๐Ÿ’ป Software๐Ÿ—„๏ธ Databases

[BUG]: Postgres Numeric Type is Inferred as Typescript String

Freshover 2 years ago
Mar 14, 20260 views
Confidence Score77%
77%

Problem

What version of `drizzle-orm` are you using? 0.27.2 What version of `drizzle-kit` are you using? 0.19.12 Describe the Bug Given the following schema [code block] Drizzle type inferences infer the numeric column as a `string` type, when it should be a `number`. [code block] Is there any way to have the numeric column inferred as a `string`? Expected behavior numeric columns to be inferred as numbers, not string Environment & setup _No response_

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: [BUG]: Postgres Numeric Type is Inferred as Typescript String

Low Risk

Using a string to maintain precision makes sense, but the documentation should mention this as it is unexpected behavior.

74

Trust Score

6 verifications

100% success
  1. 1

    Using a string to maintain precision makes sense, but the documentation should m

    Using a string to maintain precision makes sense, but the documentation should mention this as it is unexpected behavior.

Validation

Resolved in drizzle-team/drizzle-orm GitHub issue #1042. Community reactions: 26 upvotes.

Verification Summary

Worked: 6
Partial: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

drizzleormtypescriptbug