Re: Function Vanished

From: Justin Clift <aa2(at)bigpond(dot)net(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Function Vanished
Date: 2001-03-27 03:58:26
Message-ID: 3AC00FE2.94DF9F7E@bigpond.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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" <josh(at)agliodbs(dot)com> 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2001-03-27 08:26:47 Re: pl/pgsql and returning rows
Previous Message S.F. Lee 2001-03-27 01:39:56 Ygtq