Port Bug Report: string concatenation operator association problem

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: string concatenation operator association problem
Date: 1999-01-30 03:45:47
Message-ID: 199901300345.WAA78648@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Leo Kim
Your email address : cocoja(at)sarang(dot)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 particular reason 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:
---------

--------------------------------------------------------------------------

Browse pgsql-ports by date

  From Date Subject
Next Message Unprivileged user 1999-01-31 00:27:00 Port Bug Report: GRANT to GROUP(s) causes PG_DUMP(ALL) to fail
Previous Message Alex Howansky 1999-01-29 16:44:28 PostgreSQL installation results