Re: Question about format_type function

Поиск
Список
Период
Сортировка
От Tony Caduto
Тема Re: Question about format_type function
Дата
Msg-id 200504032337.24159.tony_caduto@amsoftwaredesign.com
обсуждение исходный текст
Ответ на Re: Question about format_type function  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Question about format_type function
Список 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 по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: [HACKERS] plPHP in core?
Следующее
От: Кондратьев Павел Александрович
Дата:
Сообщение: About update