From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Oliver Jowett <oliver(at)opencloud(dot)com> |
Cc: | Sergio_Lob(at)iwaysoftware(dot)com, pgsql-bugs(at)postgresql(dot)org, Ephraim Spravtsev <Ephraim_Spravtsev(at)ibi(dot)com> |
Subject: | Re: Precision and scale of numeric column reported as value |
Date: | 2005-03-23 22:46:42 |
Message-ID: | 15199.1111618002@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> There appears to be no default, which is why we currently return -1.
The spec's notion of a "default precision and scale" is that every
numeric column has a specific precision and scale --- ie, is physically
fixed-width --- and everything you store into it will be coerced to that
precision and scale. Postgres doesn't do it that way, which is why the
notion of a default is a bit meaningless.
> Scale should default to 0 per the standard, but defaults to whatever the
> precision is in PostgreSQL (see the docs for details).
If you specify a precision only, we do assume scale 0 to go with it.
It's only the case of an unconstrained numeric column that we depart
from the spec for.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Roy Badami | 2005-03-23 22:47:40 | Re: BUG #1517: SQL interval syntax is accepted by the parser, |
Previous Message | Roy Badami | 2005-03-23 22:39:51 | Re: BUG #1517: SQL interval syntax is accepted by the parser, |