Re: Scripting function definitions as SQL?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Postgres User <postgres(dot)developer(at)gmail(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Scripting function definitions as SQL?
Date: 2008-05-11 18:43:25
Message-ID: 20080511184325.GA30844@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, May 11, 2008 at 11:28:37AM -0700, Postgres User wrote:
> Unfortunately I didn't see a way to tell pg_dump to dump only objects
> of a specific type, like functions or sequences. It requires
> additional coding to parse the output and that's less than ideal...

hmmm .. "additional coding" seems a bit too much for a simple thing like
this:
pg_dump -s | perl -ne 'print if /^CREATE FUNCTION test_it/../^\s+LANGUAGE/'

of course it would be cool to have switch to do it, but hey - it hardly
even qualifies as one-liner. it's more "an expression" than code.

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA. here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Postgres User 2008-05-11 19:08:36 Re: Scripting function definitions as SQL?
Previous Message Chuck Bai 2008-05-11 18:43:23 How to create a function with multiple RefCursor OUT parameters