Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA26703; Sun, 27 Jun 93 17:28:43 -0700
Date: Sun, 27 Jun 93 17:28:43 -0700
Message-Id: <9306280028.AA26703@postgres.Berkeley.EDU>
From: kskim@hyowon.pusan.ac.kr (kim kyongsok)
Subject: btree index on user-defined data type
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Cc: kskim@hyowon.pusan.ac.kr


some students here tried to build and use
btree index on user-defined data types.
they first tried the example in the appendix of the reference:
the section name is appendix: user defined types and indices.

however, they told me the example did not work.
when they tried to define index 
(e.g., define index samind on sample using btree (dnum mytype_ops),
they got a warning message:
  warn: ... fmgr: cache lookup failed for procedure 0.

some told me that, in addition to the steps in the appendix,
he had to add one more step to make the index work, as shown below: 

  append pg_amproc (amid=pg_am.oid, amopclaid=pg_opclass.oid,
                    amproc=pr_proc.oid, amprocnum="1"::int2)
    where (pg_am.amname="btree"::char16 and
           pg_opclass.opcname="mytype_ops"::char16 and
           pg_proc.proname="btmytype_cmp"::char16)

i will appreciate any comment regarding this topic.

thanks in advance.

k kim

