Subject: != operator

From: shetty <[email-masked]>
Date: Thu, 20 Feb 92 21:49:57 -0800

Hi Netters,
          I would like to refer to page 7 of user Manual, Sec6.2.6 Joins
     * retrieve (E1.name, E2.name)
           from E1 in EMP, E2 in EMP
           where E1.age=E2.age
           and E1.name != E2.name   \g
When I run this query, It says there is no operator != for types _char and
_char, You will either have to type this query using explicit cast, or you
will have to define the operator != for _char and _char using DEFINE operator
        Does anybody have the idea why this occur and how this can be corrected
please write back on the network or send me mail.

Thanks in advance,
    Ramesh Shetty [ [email-masked] ]

---

From: postarch (Postgres Mailing Archive)
Date: Tue, 25 Feb 92 10:53:06 PST

>        Does anybody have the idea why this occur and how this can be corrected

For the above query to work there must be an operator != defined whose left
argument and right argument type matches E1.name and E2.name respectively.
The warning message you receive is telling you that no such tuple in
pg_operator exists. The reason for this is related to way in which arrays
are implemented.  We define a new type: _oldtype to set them apart from 
non-array types.  Unfortunately adding all these new types means we need 
to add new operators (with the correct left and right arg types) if we
want to allow queries like the one above.  As you have noticed this was
not done.

If you redefine the schema for EMP and give name the type char16 or
text then things should work as advertised.

Jeff Meredith
[email-masked]