Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id NAA28467 for postgres-dist; Mon, 21 Mar 1994 13:56:07 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199403212156.NAA28467@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from elysium.CS.Berkeley.EDU (elysium.CS.Berkeley.EDU [128.32.149.6]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id NAA28458 for <postgres@postgres.Berkeley.EDU>; Mon, 21 Mar 1994 13:56:06 -0800
Received: from localhost (paxson@localhost) by elysium.CS.Berkeley.EDU (8.6.4/8.1B) id NAA02362; Mon, 21 Mar 1994 13:55:38 -0800
Message-Id: <199403212155.NAA02362@elysium.CS.Berkeley.EDU>
To: cs400514@comp.hkp.hk (Lee Siu Hoi (BACS4 Class A))
cc: postgres@postgres.Berkeley.EDU, paxson@postgres.Berkeley.EDU
Date: Mon, 21 Mar 1994 13:55:37 -0800
From: "Caroline M. Paxson" <paxson@postgres.Berkeley.EDU>
Resent-To: postgres-dist@postgres.Berkeley.EDU
Resent-Date: Mon, 21 Mar 94 13:56:07 -0800
Resent-XMts: smtp


You did the following:

__________________________________

create test (i = int4) \g

define function j (language = "postquel", returntype = int4)
	arg is (test)
	as "retrieve (x = $1.i)" \g

define index test_index on test using btree (j int4_ops) \g

WARN:Mar 21 11:57:06:DefineIndex: attribute "j" not found

__________________________________


The problem you're having is that j is really a function, not
an attribute.  In other words, j is stored in pg_proc as a 
procedure, but there is no connection in the database between
this procedure and the relation "test".  In the next release of
Postgres (coming out "any day now" (TM)), you will be able to 
define a complex attribute for real, and index on it using
int4_ops.

Sorry there's no quicker fix.



Carol Paxson
paxson@cs.berkeley.edu

