Received: from mailin2.email.bigpond.com (juicer14.bigpond.com [139.134.6.23]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2R3wXw13220 for ; Mon, 26 Mar 2001 22:58:33 -0500 (EST) (envelope-from aa2@bigpond.net.au) Received: from bigpond.net.au ([139.134.4.58]) by mailin2.email.bigpond.com (Netscape Messaging Server 4.15) with SMTP id GAU8LP00.ELU; Tue, 27 Mar 2001 14:03:25 +1000 Received: from CPE-144-132-75-163.vic.bigpond.net.au ([144.132.75.163]) by mail1.bigpond.com (Claudes-Ovine-MailRouter V2.9c 1/11569089); 27 Mar 2001 13:58:22 Message-ID: <3AC00FE2.94DF9F7E@bigpond.net.au> Date: Tue, 27 Mar 2001 13:58:26 +1000 From: Justin Clift X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17-21mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane CC: Josh Berkus , pgsql-sql@postgresql.org Subject: Re: Function Vanished References: <292.985640954@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/543 X-Sequence-Number: 2213 Hi would it work to do a pg_dump -d or a pgdumpall, then look through the dumped sql file? I do that to retrieve PL/pgSQL functions from the database when I've accidentally wiped or modified the source (not often, but it happens). Regards and best wishes, Justin Clift Tom Lane wrote: > > "Josh Berkus" writes: > > I'm using 7.1 Beta 3, which has been pretty stable up until now. This > > morning, I went to export a function I spent 5 hours debugging on on > > Friday to text so that I could have a copy of the final version. To my > > horror, the function was GONE from the system catalog (pg_proc). > > Ick. Were you maybe working on it inside a transaction that you forgot > to commit? > > > I have > > not run VACUUM on the database anytime recently ... is there any > > possibility that my function is still present as a "deleted" row? > > Should still be there in the table, if you haven't vacuumed. Getting > it out again is another story though. If it was a small enough function, > good ol' "strings" would do to extract the function body, which is > probably all that you really need. But if it's more than a couple K > then the text will be compressed and difficult to spot or extract. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://www.postgresql.org/search.mpl