Skip to content

Instantly share code, notes, and snippets.

@ntamvl
Last active February 21, 2024 11:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntamvl/91c0ee21347287015f0a48f21feec1cb to your computer and use it in GitHub Desktop.
Save ntamvl/91c0ee21347287015f0a48f21feec1cb to your computer and use it in GitHub Desktop.
Max value decimal in PostgreSQL

Max value decimal in PostgreSQL

Calculate from precision, scale, and length

max_value = 10^(precision - scale)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment