From: | Matthew Hagerty <matthew(at)venux(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Numeric field quirk |
Date: | 2000-10-05 03:41:14 |
Message-ID: | 4.3.2.7.2.20001004233453.00c69f00@pop3.venux.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greetings,
I'm not sure if this is a bug, but I thought someone might like to know
about it. If you create a numeric field with the precision and scale set
the same, you can't insert anything into the field... pg-7.0.2 on
FreeBSD-4.0-Rel.
Matthew
equinox=# create table test2 ( d numeric(8,2) );
CREATE
equinox=# insert into test2 values ('08.00');
INSERT 167730 1
equinox=# select * from test2;
d
------
8.00
(1 row)
equinox=# create table test2 ( d numeric(3,3) );
CREATE
equinox=# insert into test2 values ('8');
ERROR: overflow on numeric ABS(value) >= 10^0 for field with precision 3
scale 3
equinox=# drop table test2;
DROP
equinox=# create table test2 ( d numeric(4,4) );
CREATE
equinox=# insert into test2 values ('8');
ERROR: overflow on numeric ABS(value) >= 10^0 for field with precision 4
scale 4
equinox=# create table test2 ( d numeric(3,2) );
CREATE
equinox=# insert into test2 values ('8');
INSERT 167742 1
From | Date | Subject | |
---|---|---|---|
Next Message | Billy G. Allie | 2000-10-05 03:47:42 | Announcing PgSQL - a Python DB-API 2.0 compliant interface to PostgreSQL |
Previous Message | Peter Eisentraut | 2000-10-04 20:13:46 | Re: Installation layout is still hazardous for shared prefixes |