> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> > Does anyone have an opinion on this? Why does only DEFAULT have this
> > problem? Does anyone know how inserts of '' into char() fields get
> > padded with the proper atttypmod value? Do I need to pass atttypmod to
> > all the functions that call parse_coerce, so I can pass a value for all
> > cases?
>
> Possibly DEFAULT is the only case where the constant value created by
> the parser will get shoved directly into a tuple with no run-time
> coercion? That's strictly a guess. I agree this issue needs to be
> looked at more closely.
>
> Now that we know the problem comes from missing atttypmod info, it
> seems likely that related failures can occur for NUMERIC and other
> types that depend on atttypmod. (Are there any such types? Even
> if there aren't now, there will probably be more and more in future.)
> It might be best to just bite the bullet and make the parser carry
> around both the type's OID and typmod at all times.
That was my guess too, that atttypmod would become more important.
-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026