Re: BIT/BIT VARYING names (was Re: [HACKERS] Beta for 4:30AST) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: BIT/BIT VARYING names (was Re: [HACKERS] Beta for 4:30AST)
Date
Msg-id 19134.952412302@sss.pgh.pa.us
Whole thread Raw
In response to Re: BIT/BIT VARYING names (was Re: [HACKERS] Beta for 4:30AST)  (Peter Eisentraut <peter_e@gmx.net>)
List 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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: [GENERAL] Version 7.0 beta problem
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] DROP TABLE inside a transaction block