From: | "Rajan, Pavithra" <RAJANP(at)oru(dot)com> |
---|---|
To: | "Raghavendra" <raghavendra(dot)rao(at)enterprisedb(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Dump functions alone |
Date: | 2012-02-15 16:12:44 |
Message-ID: | 924146AEF992184E84C7F5A5D6E2C87D0DB40B4B@EXCHMB05.conedison.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you. The PGExtractor is interesting! I was trying to get all the
function declaration and definition ( about 400+) by this method
pg_dump -Fc -v -s schemaname -f temp.dump yourdatabase
pg_restore -l temp.dump | grep FUNCTION >functionlist
pg_restore -L functionlist temp.dump >yourfunctions.sql
mentioned in
http://archives.postgresql.org/pgsql-general/2005-10/msg01633.php
I'll try this and your solutions as well
From: Raghavendra [mailto:raghavendra(dot)rao(at)enterprisedb(dot)com]
Sent: Wednesday, February 15, 2012 11:05 AM
To: Rajan, Pavithra
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Dump functions alone
One more thing you can also get it from pg_get_functiondef() system
function.
---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/
On Wed, Feb 15, 2012 at 9:32 PM, Raghavendra
<raghavendra(dot)rao(at)enterprisedb(dot)com> wrote:
You have two options.
* Use contrib module pg_extractor
https://github.com/omniti-labs/pg_extractor
* Use pg_proc catalog to get function definition
---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/
On Wed, Feb 15, 2012 at 6:59 PM, Rajan, Pavithra <RAJANP(at)oru(dot)com> wrote:
Hello all- Is there a way to just dump functions in a schema in to a
txt file/ sql file ? Thank you.
From | Date | Subject | |
---|---|---|---|
Next Message | Bob Pawley | 2012-02-15 16:25:32 | DDL Triggers |
Previous Message | Vojtěch Rylko | 2012-02-15 16:12:26 | Drop big index |