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. I Know that changing the SQL command to : SELECT * FROM TEMP WHERE CAST(id AS TEXT) ilike ('%122%'); work´s but for now isn't possible... :( I Tries create a cast but the function text doesn't exist more in PG 8.3 CREATE CAST (int AS text) WITH FUNCTION text(int); can everyone help me to create a cast ou other solution ? Thank´s Franklin |
- [SQL] Cast in PG 8.3 Franklin Haut
- Re: [SQL] Cast in PG 8.3 Jaime Casanova
- Re: [SQL] Cast in PG 8.3 Li, Jingfa
- Re: [SQL] Cast in PG 8.3 Jaime Casanova
- Re: [SQL] Cast in PG 8.3 Li, Jingfa
- Re: [SQL] Cast in PG 8.3 Markus Bertheau
- Re: [SQL] Cast in PG 8.3 Tom Lane
- Re: [SQL] Cast in PG 8.3 Volkan YAZICI
- [SQL] Multiple postgresql functions in a single t... Jyoti Seth
- Re: [SQL] Multiple postgresql functions in a ... Robins Tharakan
- Re: [SQL] Multiple postgresql functions i... Jyoti Seth