Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA24406; Tue, 25 Feb 92 10:53:12 -0800
Message-Id: <9202251853.AA24406@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: != operator
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: mer@postgres.berkeley.edu
In-Reply-To: Your message of "Thu, 20 Feb 92 21:49:57 PST."
             <9202210549.AA26729@postgres.Berkeley.EDU> 
Date: Tue, 25 Feb 92 10:53:06 PST

you write:

>          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

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
mer@postgres.berkeley.edu
