Re: pg_dump and ANSI types (TODO item) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_dump and ANSI types (TODO item)
Date
Msg-id Pine.LNX.4.21.0008042315400.1568-100000@localhost.localdomain
Whole thread Raw
In response to pg_dump and ANSI types (TODO item)  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Installation Report for powerpc-apple-netbsdelf1.5
Next
From: Peter Eisentraut
Date:
Subject: Re: Security choices...