Re: [GENERAL] How to define the limit length for numeric type?
От | Pavel Stehule |
---|---|
Тема | Re: [GENERAL] How to define the limit length for numeric type? |
Дата | |
Msg-id | CAFj8pRAXbXwXD1Sp=Zs6bBX_xoXZ_VfY+Qt8BoC-gxdH-v6_Mw@mail.gmail.com обсуждение исходный текст |
Ответ на | [GENERAL] How to define the limit length for numeric type? (vod vos <vodvos@zoho.com>) |
Ответы |
Re: [GENERAL] How to define the limit length for numeric type?
Re: [GENERAL] How to define the limit length for numeric type? |
Список | pgsql-general |
2017-03-12 7:14 GMT+01:00 vod vos <vodvos@zoho.com>:
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?
ostgres=# CREATE TABLE test (id serial, goose numeric(4,1)); CREATE TABLE Time: 351,066 ms postgres=# insert into test values(1,3.2); INSERT 0 1 Time: 65,997 ms postgres=# select * from test; ┌────┬───────┐ │ id │ goose │ ╞════╪═══════╡ │ 1 │ 3.2 │ └────┴───────┘ (1 row) Time: 68,022 ms
Regards
Pavel
Thank you.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: