How to define the limit length for numeric type?

From: vod vos <vodvos(at)zoho(dot)com>
To: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: How to define the limit length for numeric type?
Date: 2017-03-12 06:14:53
Message-ID: 15ac127c632.c57753f113515.4524597789027314319@zoho.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi everyone,

How to define the exact limit length of numeric type? For example,

CREATE TABLE test (id serial, goose numeric(4,1));

300.2 and 30.2 can be inserted into COLUMN goose, but I want 30.2 or 3.2 can not be inserted, how to do this?

Thank you.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Charles Clavadetscher 2017-03-12 06:23:51 Re: How to define the limit length for numeric type?
Previous Message John R Pierce 2017-03-12 01:20:40 Re: Index using in jsonb query