pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Clift <aa2@bigpond.net.au>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Function Vanished
Date: Tue, 27 Mar 2001 13:58:26 +1000
Message-ID: <3AC00FE2.94DF9F7E@bigpond.net.au> (raw)
References: <web-30035@davinci.ethosmedia.com>
	<292.985640954@sss.pgh.pa.us>

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@agliodbs.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



view thread (5+ messages)

Message-ID: <3AC00FE2.94DF9F7E@bigpond.net.au>
Permalink:  ../3AC00FE2.94DF9F7E@bigpond.net.au/
Also on:    postgresql.org/message-id/3AC00FE2.94DF9F7E@bigpond.net.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: aa2@bigpond.net.au, tgl@sss.pgh.pa.us, josh@agliodbs.com
  Subject: Re: Function Vanished
  In-Reply-To: <3AC00FE2.94DF9F7E@bigpond.net.au>
  References: <web-30035@davinci.ethosmedia.com> <292.985640954@sss.pgh.pa.us> <3AC00FE2.94DF9F7E@bigpond.net.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox