Tweak parser so that there is a defined representation for datatypes
authorTom Lane <[email protected]>
Mon, 12 Nov 2001 21:04:46 +0000 (21:04 +0000)
committerTom Lane <[email protected]>
Mon, 12 Nov 2001 21:04:46 +0000 (21:04 +0000)
commit3980a44fe86b86aee9cec17406e8e64f3160e90c
tree758e85577381775ed4e7748d458ee45f4ae6afae
parente0be4c87c2a2b0860083efbb8ce8da7be3489b00
Tweak parser so that there is a defined representation for datatypes
bpchar, bit, numeric with typmod -1.  Alter format_type so that this
representation is printed when the typmod is -1.  This ensures that
tables having such columns can be pg_dump'd and reloaded correctly.
Also, remove the rather useless and non-SQL-compliant default
precision and scale for type NUMERIC.  A numeric column declared as
such (with no precision/scale) will now have typmod -1 which means
that numeric values of any precision/scale can be stored in it,
without conversion to a uniform scale.  This seems significantly
more useful than the former behavior.  Part of response to bug #513.
doc/src/sgml/datatype.sgml
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/utils/adt/format_type.c