Re: Problem with || and data types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with || and data types
Дата
Msg-id 25761.1051752848@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problem with || and data types  ("Peter Darley" <pdarley@kinesis-cem.com>)
Ответы Re: Problem with || and data types
Список pgsql-general
"Peter Darley" <pdarley@kinesis-cem.com> writes:
> ... AND Import_Items.Name <>(SELECT QT.Import_As FROM
> Question_Types QT, Border_Type_Translation BTT WHERE QT.Value=BTT.First_Type
> AND BTT.Second_Type=Border_Questions.Type) || ':' ||
> Border_Questions.Field_Name

Actually, the first operator you have there is "<>" not "=".  "<>" is
considered a generic Op, just like "||", so the binding will be left-to-
right.  AFAIK this was the same in 7.2 and for a good ways before.

In short, you need some parentheses.

            regards, tom lane


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