Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 77E7263226D for ; Mon, 30 Aug 2010 15:56:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 43624-06 for ; Mon, 30 Aug 2010 18:56:44 +0000 (UTC) X-Greylist: delayed 00:06:38.40254 by SQLgrey-1.7.6 Received: from sapo.pt (relay6.ptmail.sapo.pt [212.55.154.26]) by mail.postgresql.org (Postfix) with SMTP id CE0F76321B4 for ; Mon, 30 Aug 2010 15:56:43 -0300 (ADT) Received: (qmail 27588 invoked from network); 30 Aug 2010 18:50:01 -0000 Received: from unknown (HELO sapo.pt) (10.134.37.162) by relay6 with SMTP; 30 Aug 2010 18:50:01 -0000 Received: (qmail 19893 invoked from network); 30 Aug 2010 18:50:03 -0000 X-AntiVirus: PTMail-AV 0.3-0.95.1 X-Scan-Status: AV clean (0.01761 seconds); AS clean (0.10950 seconds); Received: from unknown (HELO Hmv03) (hmv@[188.82.214.228]) (envelope-sender ) by mta12 (qmail-ldap-1.03) with SMTP for ; 30 Aug 2010 18:50:02 -0000 Message-ID: <4E7D507109C04F01A205FAB5D7E0607D@Hmv03> From: =?iso-8859-1?Q?H=E9lder_M._Vieira?= To: "postgres sql" References: <4C7BF692.3030903@gmail.com> In-Reply-To: <4C7BF692.3030903@gmail.com> Subject: Re: backup and document views and user functions Date: Mon, 30 Aug 2010 19:49:48 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18197 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.239 tagged_above=-5 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_NONE=-0.0001, STOX_REPLY_TYPE=0.439 X-Spam-Level: * X-Archive-Number: 201008/86 X-Sequence-Number: 34526 Hi. >I am looking for an easy way to backup views and functions. I want to store >them in our version control system. Well... As far as I can see, for functions you should go to the 'pg_catalog' schema, table 'pg_proc'. In column 'prosrc' you will find the original text, but other attributes are dispersed in a few columns, including arrays for argument names and types. For views, you should look in the view 'pg_views'. This is the result of a quick reading through the catalog, I hope I can only hope I'm not missing something, please check carefully if this is waht you're looking for. Regards, Helder M. Vieira