Re: String concatenation work in version 8.2.11 and 8.3.6

Поиск
Список
Период
Сортировка
От Julius Tuskenis
Тема Re: String concatenation work in version 8.2.11 and 8.3.6
Дата
Msg-id 49A65FA9.1000809@nsoft.lt
обсуждение исходный текст
Ответ на String concatenation work in version 8.2.11 and 8.3.6  (Tony Liao <tonyliao@yuehetone.com>)
Ответы Re: String concatenation work in version 8.2.11 and 8.3.6  (Tony Liao <tonyliao@yuehetone.com>)
Список pgsql-admin
Hi Tony,

Its not a bug - automatic casting was removed in 8.3. You should cast( a
as text)||cast(b ... = cast(123456 as text). Other option is to define
your own operators which is to be used only in case you can not fix
clients of your database...

Tony Liao rašė:
> hi,all
>       for example tableA
>       create table tableA (
>        id serial,
>        a integer,
>        b integer,
>        c integer
>       );
>       insert into tableA (a,b,c) values (12,34,56);
>
> then,
>       select id from tableA where (a||b||c)=123456;
>       in postgresql version 8.2.11,it works.
>       but in postgresql version 8.3.6,the error as bellow:
>        ERROR:  operator does not exist: integer || integer
>        LINE 1: select id from tableA where (a||b||c)=123456;
>                                       ^
>        HINT:  No operator matches the given name and argument type(s).
> You might need to add explicit type casts.
>
> is it a bug in 8.2.11 or I install 8.3.6 not completely?


--
Julius Tuskenis
Programavimo skyriaus vadovas
UAB nSoft
mob. +37068233050


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

Предыдущее
От: Tony Liao
Дата:
Сообщение: String concatenation work in version 8.2.11 and 8.3.6
Следующее
От: Tony Liao
Дата:
Сообщение: Re: String concatenation work in version 8.2.11 and 8.3.6