pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Franklin Haut <franklin.haut@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Cast in PG 8.3
Date: Tue, 05 Feb 2008 16:13:31 -0500
Message-ID: <27937.1202246011@sss.pgh.pa.us> (raw)
In-Reply-To: <47A8B788.6010304@gmail.com>
References: <47A8B788.6010304@gmail.com>

Franklin Haut <franklin.haut@gmail.com> 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



view thread (8+ messages)  latest in thread

Message-ID: <27937.1202246011@sss.pgh.pa.us>
Permalink:  ../27937.1202246011@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27937.1202246011@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, franklin.haut@gmail.com
  Subject: Re: Cast in PG 8.3
  In-Reply-To: <27937.1202246011@sss.pgh.pa.us>

* 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