Cast in PG 8.3

Поиск
Список
Период
Сортировка
От Franklin Haut
Тема Cast in PG 8.3
Дата
Msg-id 47A8B788.6010304@gmail.com
обсуждение исходный текст
Ответы Re: Cast in PG 8.3  ("Jaime Casanova" <systemguards@gmail.com>)
Re: Cast in PG 8.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Cast in PG 8.3  (Volkan YAZICI <yazicivo@ttmail.com>)
Список pgsql-sql
<br /><br /><font face="Courier New, Courier, monospace">Hi all,<br /><br /> I´m testing the new version of PostgreSQL
inwindows 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>CreateTable temp (id integer);<br /> insert into temp values (1215);<br /> insert into temp values (1216);<br />
insertinto temp values (1217);<br /> insert into temp values (1218);<br /> insert into temp values (1219);<br /> insert
intotemp values (1220);<br /> insert into temp values (1221);<br /> insert into temp values (1222);<br /> SELECT * FROM
TEMPWHERE 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
existmore in PG 8.3<br /><br /> CREATE CAST (int AS text) WITH FUNCTION text(int);<br /><br /> can everyone help me to
createa cast ou other solution ?<br /><br /> Thank´s <br /><br /><br /> Franklin<br /><br /><br /><br /><br /><br /><br
/><br/><br /><br /><br /></font> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: "Robins Tharakan"
Дата:
Сообщение: Re: TG_TABLE_NAME as identifier
Следующее
От: "Jaime Casanova"
Дата:
Сообщение: Re: Cast in PG 8.3