Re: || versus concat( ), diff behavior

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: || versus concat( ), diff behavior
Дата
Msg-id 1914.1330891905@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: || versus concat( ), diff behavior  (c k <shreeseva.learning@gmail.com>)
Список pgsql-general
c k <shreeseva.learning@gmail.com> writes:
> what will be the reason for this?

The short answer is that || uses cast-to-text semantics, whereas concat
uses output-function semantics, and char(n) is one of the weird types
for which those are different.  Don't blame us, blame the SQL committee.
Or rather than blaming anybody, stop using char(n); it's a badly
defined data type, and there are almost no cases where varchar or text
isn't preferable.

            regards, tom lane

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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: Return unknown resultset from a function
Следующее
От: Rory Campbell-Lange
Дата:
Сообщение: Re: Return unknown resultset from a function