Andreas Pflug <Andreas.Pflug@web.de> writes:
> The well-known data types PG_TYPE_DATETIME, PG_TYPE_TIMESTAMP_NO_TMZONE,
> PG_TYPE_TIME, PT_TYPE_TIME_WITH_TMZONE are handled in a special way
> concerning the atttypmod field. This will fail for domain types of that
> base type.
This is correct, since the domain won't expose the atttypmod it assigns
to the underlying type.
> Actually, best thing for this problems would be if the backend would
> deliver the base type oid, not the user type oid.
There was some discussion of that idea in pgsql-hackers last week, but
we didn't come to a definite conclusion. How do others feel about it?
regards, tom lane