RE: [SQL] using matches on int4 - Mailing list pgsql-sql

From Jackson, DeJuan
Subject RE: [SQL] using matches on int4
Date
Msg-id F10BB1FAF801D111829B0060971D839F6445CB@cpsmail
Whole thread Raw
List pgsql-sql
if you want to match all id's that start with 2 try [you might also what
to create a functional index on id as text(id)]:
 select * from users where id::text ~~ (2::text || '%');
or
 select * from users where id::text ~ ('^' || 2::text);
if you are trying to get exactly 200 use:
 select * from users where id=200;

    -DEJ


> -----Original Message-----
> On Thu, 4 Feb 1999, Jackson, DeJuan wrote:
>
> > What kind of matching are you trying to do?
> > Most likely you don't really need to create an operator.
>
> I was trying to find all people with ids of 200.
>
> -Greg
>

pgsql-sql by date:

Previous
From: Gregory Holston
Date:
Subject: RE: [SQL] using matches on int4
Next
From: George Moga
Date:
Subject: Re: [SQL] using matches on int4