Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6DE832E3F46 for ; Tue, 5 Feb 2008 17:13:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 68003-02 for ; Tue, 5 Feb 2008 17:13:35 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 743B12E3F16 for ; Tue, 5 Feb 2008 17:13:34 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m15LDV99027938; Tue, 5 Feb 2008 16:13:31 -0500 (EST) To: Franklin Haut cc: pgsql-sql@postgresql.org Subject: Re: Cast in PG 8.3 In-reply-to: <47A8B788.6010304@gmail.com> References: <47A8B788.6010304@gmail.com> Comments: In-reply-to Franklin Haut message dated "Tue, 05 Feb 2008 16:22:48 -0300" Date: Tue, 05 Feb 2008 16:13:31 -0500 Message-ID: <27937.1202246011@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/24 X-Sequence-Number: 30115 Franklin Haut writes: > Create Table temp (id int4); > insert into temp values (1215); > insert into temp values (1216); > insert into temp values (1217); > insert into temp values (1218); > insert into temp values (1219); > insert into temp values (1220); > insert into temp values (1221); > insert into temp values (1222); > SELECT * FROM TEMP WHERE id ilike ('%122%'); > > return ok, 3 rows (1220, 1221 and 1222) That usage is simply bizarre. Why don't you define the column as text, instead, if that's the type of query you intend to perform on it? regards, tom lane