Re: doesn't recognize "!=-" (not equal to a negative value)

From: David Fetter <david(at)fetter(dot)org>
To: Paul Tilles <Paul(dot)Tilles(at)noaa(dot)gov>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: doesn't recognize "!=-" (not equal to a negative value)
Date: 2006-07-12 14:48:41
Message-ID: 20060712144841.GB6212@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jul 11, 2006 at 04:26:41PM -0400, Paul Tilles wrote:
> Yes. That works. I think that the parser should work properly either way.

You're mistaken. PostgreSQL by design makes it possible for you to
define a custom operator like !=- and use it.

>
> Paul
>
> Bruce Momjian wrote:
> >Paul Tilles wrote:
> >
> >>Version postgres 7.4.7:
> >>
> >>Following sql
> >>
> >>UPDATE tablename SET value = 0.0 where value!=-9.4;
> >>
> >>results in the error message
> >>
> >>ERROR: operator does not exist: smallint !=- integer
> >>HINT: No operator matches the given name and argument type(s). You may
> >>need to add explicit type casts.
> >>
> >
> >Have you tried?
> >
> >value != -9.4
> >
> >---------------------------------------------------------------------------
> >
> >
> >>Seems that postgres has a problem parsing a "not equal negative value".
> >>
> >>Anybody know if this is fixed in later versions?
> >>
> >>Paul Tilles
> >>
> >>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 4: Have you searched our list archives?
> >>
> >> http://archives.postgresql.org
> >>
> >
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message gonzales 2006-07-12 14:52:33 Re: HardDisk space
Previous Message Karl O. Pinc 2006-07-12 14:45:36 Re: Long term database archival