Re: RfD: more powerful "any" types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: RfD: more powerful "any" types
Дата
Msg-id 6639.1252609812@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: RfD: more powerful "any" types  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: RfD: more powerful "any" types  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: RfD: more powerful "any" types  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> I don't afraid about crashing. Simply I have not idea what sql
> sprintf's behave in case:

> SELECT sprintf('some %s', 10)

That one I don't think is hard --- coerce the input type to text and
print the string.

> SELECT sprintf('some %d', 10::mycustomtype)

For the formats that presume an integer or float input in C, perhaps
we could coerce to numeric (failing if that fails) and then print
appropriately.  Or maybe int or float8 would be more appropriate
conversion targets.
        regards, tom lane


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: RfD: more powerful "any" types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: RfD: more powerful "any" types