X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id B629E9DCAD3 for ; Thu, 8 Dec 2005 11:32:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13530-07 for ; Thu, 8 Dec 2005 11:32:48 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from presinet.com (presinet.com [209.53.156.1]) by postgresql.org (Postfix) with ESMTP id 408A09DCAAF for ; Thu, 8 Dec 2005 11:32:40 -0400 (AST) Received: from [10.10.1.151] ([10.10.1.151]) by presinet.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 Dec 2005 07:29:55 -0800 Message-ID: <4398521F.7040001@presinet.com> Date: Thu, 08 Dec 2005 07:32:47 -0800 From: Bricklen Anderson User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Benjamin Arai CC: pgsql-admin@postgresql.org Subject: Re: Backing up views, functions References: <4397D871.20208@cs.ucr.edu> In-Reply-To: <4397D871.20208@cs.ucr.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Dec 2005 15:29:55.0703 (UTC) FILETIME=[3DD3E070:01C5FC0C] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/65 X-Sequence-Number: 19785 Benjamin Arai wrote: > I have a database of several million records and we are currently > developing pl functions and views. How do you dump only the code for > views and functions? > > Benjamin > Also, one way of recreating views: select 'drop view '||viewname||'; CREATE OR REPLACE view '||viewname||' as '||definition||'\n' from pg_views where schemaname='public';