Re: BIT/BIT VARYING names (was Re: [HACKERS] Beta for 4:30AST)

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Thomas Lockhart <lockhart@alumni.caltech.edu>, Bruce Momjian <pgman@candle.pha.pa.us>, pgsql-hackers@postgresql.org
Date: 2000-03-07T06:58:22Z
Lists: pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> In turn I'm thinking that it might be nice to have a backend function like
> format_type(name[, int4]) that formats an internal type and any size
> modifier for client consumption, like

> 	format_type('varchar', 8)     => "CHARACTER VARYING(8)"
> 	format_type('my type')        => "\"my type\""
> 	format_type('numeric', {xxx}) => "NUMERIC(9,2)"

> That could put an end to keeping track of backend implementation details
> in psql, pg_dump, and friends.

Seems like a good idea, though I think it's a bit late in the 7.0 cycle
for such a change.  Maybe for 7.1?

Also, I assume you mean that the int4 arg would be the typmod value ---
your examples are not right in detail for that interpretation.

			regards, tom lane