Re: string function - "format" function proposal

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: string function - "format" function proposal
Дата
Msg-id AANLkTi=gDpRsRrizcVnKFPcNJf-52dcfeVrfPwzc2PuA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: string function - "format" function proposal  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Список pgsql-hackers
2010/10/18 Itagaki Takahiro <itagaki.takahiro@gmail.com>:
> On Sat, Oct 16, 2010 at 7:29 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> No doubt.  The problem is that we're going to end up with those bells
>> and whistles in two places: in to_char or other type-specific
>> formatting functions, and again in format.
>
> If we decide to use C-like sprintf(), I think the only thing we can do
> is to implement C-syntax as much as possible. Users will expect the
> function behaves as sprintf, because it has the similar syntax.
> It's not an item for now, but someone would request it at a future date.
>

yes, it is reason why I wrote two functions - sprintf and format.

>
> BTW, the interoperability is why I proposed {} syntax. For example,
> {1:YYYY-MM-DD} for date is expanded to to_char($1, 'YYYY-MM-DD').
> (Maybe it's not so easy; It requires function lookups depending on types.)

why this shorcut is necessary?

Regards

Pavel Stehule

>
> --
> Itagaki Takahiro
>


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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Extensions, this time with a patch
Следующее
От: Robert Haas
Дата:
Сообщение: Re: leaky views, yet again