Re: Cast in PG 8.3

From: "Li, Jingfa" <jinli(at)paypal(dot)com>
To: "Jaime Casanova" <systemguards(at)gmail(dot)com>, "Franklin Haut" <franklin(dot)haut(at)gmail(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Cast in PG 8.3
Date: 2008-02-05 19:39:26
Message-ID: 0A89F5E49BE1BD418D5113AD3BB51B41025BB17D@RHV-EXM-01.corp.ebay.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

check the typo -- "ilike"

-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org] On Behalf Of Jaime Casanova
Sent: Tuesday, February 05, 2008 11:19 AM
To: Franklin Haut
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Cast in PG 8.3

On Feb 5, 2008 2:22 PM, Franklin Haut <franklin(dot)haut(at)gmail(dot)com> wrote:
>
>
> Hi all,
>
> I´m testing the new version of PostgreSQL in windows plataform but i
> have a problem.
>
>
> In PG 8.2
>
> 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)
>
>
>
> In PG 8.3
>
> Create Table temp (id integer);
> 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%');
>
> Error:
> operator does not exist: integer ~~* unknown at character 31
> HINT: No operator matches the given name and argument type(s).
> You might need to add explicit type casts.
>

did you read the release notes?
http://www.postgresql.org/docs/current/static/release-8-3.html
"""
Non-character data types are no longer automatically cast to TEXT (Peter, Tom) """

--
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Midgley 2008-02-05 19:42:20 Negative numbers for PK/ID's?
Previous Message Franklin Haut 2008-02-05 19:22:48 Cast in PG 8.3