> I think this could be done by having gram.y insert -1 as the default
> typmod for a "char" or "numeric" Typename. The rest of the system
> already interprets such a typmod as specifying no particular length
> constraint. Then, to preserve the rule that
> create table foo (bar char);
> creates a char(1) field, analyze.c would have to be responsible for
> inserting the appropriate default length in place of -1 when processing
> a column definition.
Sounds good. My first inclination was to work this out in gram.y,
which you could do pretty easily for TYPECAST rules, but perhaps it
would be better to isolate *all* of the default size settings to a
separate routine called from the appropriate place. Eventually, this
could even be a tunable parameter settable during the session (e.g.
"SET DEFAULT PRECISION NUMERIC ...").
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California