Oops! Its bug in parser????

Поиск
Список
Период
Сортировка
Искать

Oops! Its bug in parser????

От:
Vic <vic@dcc.dp.ua>
Дата:
 Hi I try  this  "construction"  : select myfield from mytable  where
myfield=-1
And get  this:
ERROR:  Unable to identify an operator '=-' for types 'numeric' and
'int4'       You will have to retype this query using an explicit castI  don't lik this!
Vic


Re: Oops! Its bug in parser????

От:
Hannu Krosing <hannu@tm.ee>
Дата:
Vic wrote:

>  Hi
>   I try  this  "construction"  : select myfield from mytable  where
> myfield=-1
> And get  this:
> ERROR:  Unable to identify an operator '=-' for types 'numeric' and
> 'int4'

What version of PostgreSQL are you using ?

I believe this is fixed a long time ago.

If you don't want to upgrade just put spaces in
> select myfield from mytable  where myfield = -1

----------------
Hannu


Re: Oops! Its bug in parser????

От:
Vic <vic@dcc.dp.ua>
Дата:
> What version of PostgreSQL are you using ?
>
PostgreSQL 7.0.0 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66

>
> I believe this is fixed a long time ago.

If you don't want to upgrade just put spaces in

>  > select myfield from mytable  where myfield = -1
Ya - i don't want  make  upgrage  all  system for  this  little  bug (and
can't make it - i'm not root),but  I maybe want   a path to   it.
Vic.


Re: Oops! Its bug in parser????

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Vic  writes:
>> What version of PostgreSQL are you using ?

>  PostgreSQL 7.0.0 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66

Evidently not a released version, but some beta, since this behavior was
changed before 7.0 release (cf. scan.l CVS log for 18-Mar-2000).

I *strongly* suggest an update to 7.0.3 ... there are some pretty nasty
critters waiting to bite you in 7.0 beta.
		regards, tom lane

FAQ