From: Jackson, DeJuan <djackson@cpsgroup.com>
To: Gregory Holston <holston@itd.nrl.navy.mil>
To: Jackson, DeJuan <djackson@cpsgroup.com>
Cc: pgsql-sql@hub.org
Subject: RE: [SQL] using matches on int4
Date: Thu, 4 Feb 1999 12:02:39 -0600
Message-ID: <F10BB1FAF801D111829B0060971D839F6445CB@cpsmail> (raw)
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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: djackson@cpsgroup.com, holston@itd.nrl.navy.mil, pgsql-sql@hub.org
Subject: Re: [SQL] using matches on int4
In-Reply-To: <F10BB1FAF801D111829B0060971D839F6445CB@cpsmail>
References: <F10BB1FAF801D111829B0060971D839F6445CB@cpsmail>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox