<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
<font face="Courier New, Courier, monospace">Hi all,<br>
<br>
I´m testing the new version of PostgreSQL in windows plataform but i
have a problem.<br>
<br>
<br>
<b>In PG 8.2 </b><br>
<br>
Create Table temp (id int4);<br>
insert into temp values (1215);<br>
insert into temp values (1216);<br>
insert into temp values (1217);<br>
insert into temp values (1218);<br>
insert into temp values (1219);<br>
insert into temp values (1220);<br>
insert into temp values (1221);<br>
insert into temp values (1222);<br>
SELECT * FROM TEMP WHERE id ilike ('%122%');<br>
<br>
return ok, 3 rows (1220, 1221 and 1222)<br>
<br>
<br>
<br>
<b>In PG 8.3<br>
<br>
</b>Create Table temp (id integer);<br>
insert into temp values (1215);<br>
insert into temp values (1216);<br>
insert into temp values (1217);<br>
insert into temp values (1218);<br>
insert into temp values (1219);<br>
insert into temp values (1220);<br>
insert into temp values (1221);<br>
insert into temp values (1222);<br>
SELECT * FROM TEMP WHERE id ilike ('%122%');<br>
<br>
<b>Error:</b><br>
operator does not exist: integer ~~* unknown at character 31<br>
HINT: No operator matches the given name and argument type(s). <br>
You might need to add explicit type casts.<br>
<br>
<br>
I Know that changing the SQL command to :<br>
</font><font face="Courier New, Courier, monospace">SELECT * FROM TEMP
WHERE CAST(id AS TEXT) ilike ('%122%'); <br>
work´s but for now isn't possible... :(<br>
<br>
</font><font face="Courier New, Courier, monospace"><br>
I Tries create a cast but the function text doesn't exist more in PG
8.3<br>
<br>
CREATE CAST (int AS text) WITH FUNCTION text(int);<br>
<br>
can everyone help me to create a cast ou other solution ?<br>
<br>
Thank´s <br>
<br>
<br>
Franklin<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font>
</body>
</html>