Implicit type conversion -- where documented?

Поиск
Список
Период
Сортировка
От Kirk Parker
Тема Implicit type conversion -- where documented?
Дата
Msg-id CANwZ8r=Z-fUmZkSQAV1O0gsOBedt9qDEOw3tbYdYbx3Vt9ezDQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Implicit type conversion -- where documented?  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-docs
I came across what seems like anomalous behavior regarding implicit conversion from a numeric type to text.  You can write:

    select 3.1416 || '?';

and the number implicitly converts to text and concatenates just fine, but writing:

   select trim(3.1416);

fails with an error message.  This seems odd to me--in both cases a float literal is used in a context expecting text; in one case it implicitly converts, in the other it doesn't.

*This brings up my real question*: are the details of this documented anywhere?  Chapter 10 refers to ' implicit conversions' but I can't see anywhere that the docs explain the details of how it is done, that would explain the observed difference in behavior described above.

Thanks!

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_relation_is_updatable, pg_column_is_updatable not documented
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Implicit type conversion -- where documented?