Re: string function - "format" function proposal

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема Re: string function - "format" function proposal
Дата
Msg-id AANLkTimLcRjqT1umE6ntWyW8qEZtKG4PyjuxUL77G8=n@mail.gmail.com
обсуждение исходный текст
Ответ на string function - "format" function proposal  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: string function - "format" function proposal  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
> Let's make format support %s, %i, and %l, as well as
> allowing things like %$3l (meaning, escape the third argument as a
> literal and interpolate here), and call it good.

Your idea is: % [ $ pos ] format  -- ex. %$3l , %l Escapes: %% => %

Just for information, $ and pos are reversed in C sprintf. % [ pos $ ] format  -- ex. %3$l , %l Escapes: %% => %

IMHO, I like {} syntax as like as C# because the format strings are extensible. { pos [ : format ] } -- ex {3:l}, {3}
(,and {l} could be also supported) Escapes: {{ => {, }} => }
 

-- 
Itagaki Takahiro


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Why do we have a database specification in .pgpass?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: string function - "format" function proposal