============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Leo Kim
Your email address : cocoja@sarang.net
Category : runtime: back-end: SQL
Severity : non-critical
Summary: string concatenation operator association problem
System Configuration
--------------------
Operating System : FreeBSD 2.2.8
PostgreSQL version : 6.4
Compiler used : egcs 2.91.5
Hardware:
---------
Pentium II 300MHz, 128MB RAM
Versions of other tools:
------------------------
--------------------------------------------------------------------------
Problem Description:
--------------------
The string concatenation operator || doesn't have any associativity like + or -.
That is I can't use it as 'a' || 'b' || 'c' || 'd'.
I had to use parenthesis to get the result as (('a' || 'b') || 'c') || 'd'. I don't believe there should be a
particularreason to deffer || operator from other binary operator. Is this a bug? Or any intention for it?
--------------------------------------------------------------------------
Test Case:
----------
create table x (data text);
insert into x values ('a'||'b'||'c'||'d'); <- not working
insert into x values (((('a'||'b')||'c')||'d')); <- working
--------------------------------------------------------------------------
Solution:
---------
--------------------------------------------------------------------------