Received: from rhea.arexim.ro (root@mail.arexim.ro [193.230.225.5]) by hub.org (8.9.2/8.9.1) with ESMTP id NAA14804 for ; Thu, 4 Feb 1999 13:16:02 -0500 (EST) (envelope-from george@flex.ro) Received: from arexim.arexim.ro (root@arexim.arexim.ro [193.230.225.2] (may be forged)) by rhea.arexim.ro (8.9.0/8.9.0) with ESMTP id VAA30819; Thu, 4 Feb 1999 21:18:53 +0200 Received: from flex.ro ([193.230.255.93]) by arexim.arexim.ro (8.7.5/8.7.3) with ESMTP id VAA26145; Thu, 4 Feb 1999 21:14:58 +0200 Sender: gestoc@arexim.ro Message-ID: <36B9E215.C0FA3F0E@flex.ro> Date: Thu, 04 Feb 1999 20:08:21 +0200 From: George Moga X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.2.0 i586) MIME-Version: 1.0 To: Gregory Holston , SQL PostgreSQL Subject: Re: [SQL] using matches on int4 References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Gregory Holston wrote: > Hi List, > I tried to do this query: > real=> select * from users where id ~ 2; > ERROR: There is no operator '~' for types 'int4' and 'int4' > You will either have to retype this query using an explicit cast, > or you will have to define the operator using CREATE OPERATOR > My question is how would I create an operator? > > Thanks in advance, > > > -Greg > > ....... > > I was trying to find all people with ids of 200. > > -Greg > If I undestund what do you want: select * from users where %id/100 = 2; This returns all records whith ids between [200 ... 299] I use PostgbreSQL 6.4 on Red Hat Linux 5.2 with 2.2.0 kernel. ------- Best, George Moga, george@flex.ro Braila, ROMANIA