Re: Cast in PG 8.3 - Mailing list pgsql-sql

From Tom Lane
Subject Re: Cast in PG 8.3
Date
Msg-id 27937.1202246011@sss.pgh.pa.us
Whole thread Raw
In response to Cast in PG 8.3  (Franklin Haut <franklin.haut@gmail.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "Markus Bertheau"
Date:
Subject: Re: Cast in PG 8.3
Next
From: Tom Lane
Date:
Subject: Re: Negative numbers for PK/ID's?