Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BA77B632205 for ; Thu, 26 Feb 2009 05:24:05 -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 99458-02 for ; Thu, 26 Feb 2009 05:24:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vilnius.balt.net (vilnius.balt.net [195.14.170.14]) by mail.postgresql.org (Postfix) with ESMTP id 9483C63400C for ; Thu, 26 Feb 2009 05:24:02 -0400 (AST) Received: from nSoft.lt (unknown [217.117.29.29]) by vilnius.balt.net (Postfix) with ESMTP id 7695A27A58A; Thu, 26 Feb 2009 11:23:59 +0200 (EET) Received: from [192.168.16.100] (unknown [192.168.16.100]) by nSoft.lt (Postfix) with ESMTP id EAFE812FB66; Thu, 26 Feb 2009 14:41:58 +0000 (GMT) Message-ID: <49A65FA9.1000809@nsoft.lt> Date: Thu, 26 Feb 2009 11:23:53 +0200 From: Julius Tuskenis User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Tony Liao CC: pgsql-admin@postgresql.org Subject: Re: String concatenation work in version 8.2.11 and 8.3.6 References: <8f750b7c0902260032u76d11ca8p1349fec8e899d36c@mail.gmail.com> In-Reply-To: <8f750b7c0902260032u76d11ca8p1349fec8e899d36c@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200902/230 X-Sequence-Number: 31451 Hi Tony, Its not a bug - automatic casting was removed in 8.3. You should cast( a as text)||cast(b ... = cast(123456 as text). Other option is to define your own operators which is to be used only in case you can not fix clients of your database... Tony Liao rašė: > 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? -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050