Possible bug in parsing

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Possible bug in parsing
Дата
Msg-id 350E5E75.325F4A24@sid.trust.ee
обсуждение исходный текст
Список pgsql-hackers
Can anyone explain the following:

hannu=> select 1 + 2 + 3 + 4;
?column?
--------
      10
(1 row)

works fine, but:

hannu=> select '1' || '2' || '3';
ERROR:  parser: parse error at or near "||"
hannu=> select ('1' || '2') || '3';
NOTICE:  there is more than one operator || for types
NOTICE:  unknown and unknown. You will have to retype this query
ERROR:  using an explicit cast
hannu=> select ('1'::text || '2') || '3';
?column?
--------
     123
(1 row)

I understand the 'there is more than one operator' errors, but
what is so different between operators + and || ?

Hannu


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

Предыдущее
От: "Pedro J. Lobo"
Дата:
Сообщение: Re: [HACKERS] Alpha initdb fixed!
Следующее
От: "Pedro J. Lobo"
Дата:
Сообщение: Unix Domain Sockets error (was Re: [HACKERS] Alpha initdb fixed!)