Philip Warner writes:
> Just looking at the TODO list for other pg_dump related items, and saw:
>
> add pg_dump option to dump type names as standard ANSI types
>
> Tow questions:
>
> Do we already have a function to represent PG types as ANSI standard types?
format_type(pg_type.oid, pg_attribute.atttypmod)
> How should types that are not in the standard be represented?
Whatever format_type gives you.
I wrote format_type for exactly this purpose a few weeks ago, but I
figured I let you get the glory for making pg_dump use it. :-) psql uses
it as well.
Note: IMO it should not be an *option* to use format_type, it should
always be used. It's nice for encapsulation on the programming side and
there's no reason for using any other type names.
--
Peter Eisentraut Sernanders väg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden