Re: Question about format_type function - Mailing list pgsql-general

From Tony Caduto
Subject Re: Question about format_type function
Date
Msg-id 200504032337.24159.tony_caduto@amsoftwaredesign.com
Whole thread Raw
In response to Re: Question about format_type function  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Question about format_type function  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Would it not be possible to add another param to the function like I mentioned
and keep everyone happy?  Users coming from MS SQL server look puzzled when
they see the huge Character Varying(n) in a admin tool.

I have not programmed in C since 1993, but I know in pascal you can have a
parameter for a function be set as a const, that way it would remain
compatible with the current function, then some logic could be added to make
the long names be short? or even a overloaded function would be ok.

I have got around this by using  a case statment but it would be so nice if I
could just call that function and have the results look like what users see
in tools such as MS SQL servers enterprise manager.

Thanks,

Tony

On Sunday 03 April 2005 20:49 pm, Tom Lane wrote:
> Tony Caduto <tony_caduto@amsoftwaredesign.com> writes:
> > The format_type function is great, except for the way it formats
> > varchars, it always returns Character Varying or whatever,
> > ...
> > I don't know of any other system that shows varchars in this way, they
> > should just be formated as varchar(50).
>
> Hmm ... AFAICS, "character varying(n)" and "varchar(n)" are equally
> valid spellings according to the SQL spec.
>
> I'd personally prefer the shorter spelling too, but I can't see any
> particularly strong argument for changing it.
>
>    regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: [HACKERS] plPHP in core?
Next
From: Кондратьев Павел Александрович
Date:
Subject: About update