Re: RfD: more powerful "any" types

Поиск
Список
Период
Сортировка
От Aidan Van Dyk
Тема Re: RfD: more powerful "any" types
Дата
Msg-id 20090911105727.GH3488@oak.highrise.ca
обсуждение исходный текст
Ответ на Re: RfD: more powerful "any" types  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
* Alvaro Herrera <alvherre@commandprompt.com> [090910 23:32]:
> Is this really all that hard?  I'm thinking it could be implemented by
> using the real C sprintf underneath, passing one % specifier and its
> corresponding parameter at a time, coerced to whatever the conversion
> specifier specifies.

It's not "hard", but please, don't break this, to make it more "not
hard":

> The only thing that breaks this idea is the $n positional specifiers, I
> think.

And also, please work for user-defined types (meaning you need to use
the type and catalog system to lookup coercions, not hard-code
anything...

l-)

It's doable, but it's going got be a lot of explicit casting and
coercion, and going to require a lot of documentation and error
states...

Remember, users using sprintf are really going to want it to act exactly
as it would if they were using C, minus the crash part.

a.
-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

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

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: Why does LOG have higher priority than ERROR and WARNING?
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: RfD: more powerful "any" types