Oops! Its bug in parser????

Started by Vicabout 25 years ago4 messageshackers
Jump to latest
#1Vic
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 cast
I don't lik this!
Vic

#2Vic
vic@dcc.dp.ua
In reply to: Vic (#1)
Re: Oops! Its bug in parser????

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.

#3Hannu Krosing
hannu@tm.ee
In reply to: Vic (#1)
Re: Oops! Its bug in parser????

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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Vic (#2)
Re: Oops! Its bug in parser????

Vic <vic@dcc.dp.ua> 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