Re: string function - "format" function proposal

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: string function - "format" function proposal
Дата
Msg-id 26947.1283783309@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: string function - "format" function proposal  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> Why I think so this is useful - sometimes people asked some GUC for
> formatting date, boolean and other. If these functions try to use a
> cast to text first, then there is some space for customization via
> custom cast functions.

This is basically nonsense.  If you don't control a type's output
function, you don't control its cast to text either.  Nor do I think
it's a good idea to encourage people to make their casts to text operate
differently from their output functions.  We have that one wart in
boolean casting because the SQL standard specifies the result of cast to
text and it's different from our historical practice in the bool output
function --- but it is a wart, not something we should encourage people
to emulate.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: string function - "format" function proposal
Следующее
От: Itagaki Takahiro
Дата:
Сообщение: Re: string function - "format" function proposal