Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9F1CA633D60 for ; Thu, 26 Feb 2009 04:32:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 45303-03 for ; Thu, 26 Feb 2009 04:32:55 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.174]) by mail.postgresql.org (Postfix) with ESMTP id 1B0DB632231 for ; Thu, 26 Feb 2009 04:32:52 -0400 (AST) Received: by wf-out-1314.google.com with SMTP id 23so497479wfg.28 for ; Thu, 26 Feb 2009 00:32:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.191.5 with SMTP id o5mr536460wff.326.1235637170589; Thu, 26 Feb 2009 00:32:50 -0800 (PST) Date: Thu, 26 Feb 2009 16:32:50 +0800 Message-ID: <8f750b7c0902260032u76d11ca8p1349fec8e899d36c@mail.gmail.com> Subject: String concatenation work in version 8.2.11 and 8.3.6 From: Tony Liao To: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd28df29fd01a0463ce32c0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200902/229 X-Sequence-Number: 31450 --000e0cd28df29fd01a0463ce32c0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit hi,all for example tableA create table tableA ( id serial, a integer, b integer, c integer ); insert into tableA (a,b,c) values (12,34,56); then, select id from tableA where (a||b||c)=123456; in postgresql version 8.2.11,it works. but in postgresql version 8.3.6,the error as bellow: ERROR: operator does not exist: integer || integer LINE 1: select id from tableA where (a||b||c)=123456; ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. is it a bug in 8.2.11 or I install 8.3.6 not completely? --000e0cd28df29fd01a0463ce32c0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable hi,all
=A0=A0=A0=A0=A0 for example tableA
=A0=A0=A0=A0=A0 create tabl= e tableA (
=A0=A0=A0=A0=A0=A0 id serial,
=A0=A0=A0=A0=A0=A0 a integer= ,
=A0=A0=A0=A0=A0=A0 b integer,
=A0=A0=A0=A0=A0=A0 c integer
=A0= =A0=A0=A0=A0 );
=A0=A0=A0=A0=A0 insert into tableA (a,b,c) values (12,34= ,56);

then,
=A0=A0=A0=A0=A0 select id from tableA where (a||b||c)=3D123456;=A0=A0=A0=A0=A0 in postgresql version 8.2.11,it works.
=A0=A0=A0=A0=A0 = but in postgresql version 8.3.6,the error as bellow:
=A0=A0=A0=A0=A0=A0 = ERROR:=A0 operator does not exist: integer || integer
=A0=A0=A0=A0=A0=A0 LINE 1: select id from tableA where (a||b||c)=3D123456;<= br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ^
=A0=A0=A0=A0=A0=A0 HINT:=A0 No= operator matches the given name and argument type(s). You might need to ad= d explicit type casts.

is it a bug in 8.2.11 or I install 8.3.6 not completely?
--000e0cd28df29fd01a0463ce32c0--