Re: Error: Operator does not exist: "char"=integer

Поиск
Список
Период
Сортировка
От Aarni
Тема Re: Error: Operator does not exist: "char"=integer
Дата
Msg-id 200812181336.22939.aarni@kymi.com
обсуждение исходный текст
Ответ на Re: Error: Operator does not exist: "char"=integer  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Error: Operator does not exist: "char"=integer  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-general
On Thursday 18 December 2008 12:46:38 Peter Eisentraut wrote:
> novnov wrote:
> > I have restored a postgres 8.2.4-1 db onto a postgres 8.3.1-1 server, and
> > when I try to work with a table I get this error:
> >
> > Error: Operator does not exist: "char" = integer
> >
> > Hopefully that is enough of a clue to be useful. Maybe this is the first
> > time I've tried moving one of my non-trivial pg projects to a
> > significantly different version of postgres; is there a conversion
> > process that helps with moving between versions?
>
> Yes, reading the release notes. ;-)  I think you will find your problem
> explained there.

Hi,

I had similar errors here and there after moving to 8.3.3 from 8.2.x., no more
automatic casts.

"ERROR:  operator does not exist: character varying = integer at character 286
HINT:  No operator matches the given name and argument type(s). You might need
to add explicit type casts."

Quick fix to sql statements eg.

... WHERE CAST (your_char AS INTEGER) = integer ...
... WHERE CAST (your_char AS INTEGER) IN (1,2,3,...)

BR,

--
Aarni Ruuhimäki


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

Предыдущее
От: Alan Hodgson
Дата:
Сообщение: Re: Postgre Tables problem
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Error: Operator does not exist: "char"=integer