Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id C54C1477464 for ; Fri, 28 Jun 2002 16:12:29 -0400 (EDT) Mailbox-Line: From JanWieck@Yahoo.com Fri Jun 28 16:12:29 2002 Received: from smtp014.mail.yahoo.com (smtp014.mail.yahoo.com [216.136.173.58]) by postgresql.org (Postfix) with SMTP id 2480A47751A for ; Fri, 28 Jun 2002 15:39:05 -0400 (EDT) Received: from psc.progress.com (HELO Yahoo.com) (janwieck@192.233.92.200 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 28 Jun 2002 19:39:05 -0000 Message-ID: <3D1CBB56.1E86357E@Yahoo.com> Date: Fri, 28 Jun 2002 15:39:02 -0400 From: Jan Wieck X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.2.14-6.1.1smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Jie Liang Cc: 'Bruce Momjian' , "'admin@postgresql.org'" , "'pgsql-sql@postgresql.org'" Subject: Re: pg_restore cannot restore function References: <7C760DAA511DC74B99E7D22189F786F101BF2104@MAIL01.stbernard.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none version=2.30 X-Spam-Level: X-Archive-Number: 200206/403 X-Sequence-Number: 8368 Jie Liang wrote: > > I use > pg_dump -Fc mydb > dbf > then I create another db by: > createdb mydb2 > I use > pg_restore -P myfunction -d mydb2 dbf > > cannot restore myfunction into mydb2 > > why?????? Good question. Is there any error message in the postmaster log? If the function is written in a procedural language, is that language enabled in the target database? If the function is written in the SQL language, do all underlying objects like tables and views exist? If it's a C language function, does the shared object containing the function exist at the expected location? Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #