"Thomas G. Lockhart" <lockhart@alumni.caltech.edu> writes:
> A better general approach to the type qualifier problem might be to
> define a variable-length data type which specifies column
> characteristics, and then pass that around. For character strings, it
> would have one field, and for numeric() and decimal() it would have two.
... and for ordinary column datatypes of fixed properties, it needn't
have *any* fields. That would more than pay for the space cost of
supporting a variable-width data type, I bet. I like this.
Once atttypmod is exposed to applications it will be much harder to
change its representation or meaning, so I'd suggest getting this right
before 6.4 comes out. If that doesn't seem feasible, I think I'd even
vote for backing out the change that makes atttypmod visible until it
can be done right.
regards, tom lane