pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Benjamin Arai <barai@cs.ucr.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: Backing up views, functions
Date: Thu, 8 Dec 2005 00:55:00 -0700
Message-ID: <20051208075500.GA12878@winnie.fuhr.org> (raw)
In-Reply-To: <4397D871.20208@cs.ucr.edu>
References: <4397D871.20208@cs.ucr.edu>

On Wed, Dec 07, 2005 at 10:53:37PM -0800, 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?

pg_dump doesn't allow you to be that selective, but you could use
the --schema-only option to dump everything except the data.  If
you use one of the non-text dump formats then you could selectively
restore objects with pg_restore.  See the pg_restore documentation
for the -l/--list and -L/--use-list options and the example near the
bottom of the page.

Some people maintain the code for functions and views outside the
database, perhaps under a version control system, and then reload
it when they make changes.

-- 
Michael Fuhr



view thread (4+ messages)  latest in thread

Message-ID: <20051208075500.GA12878@winnie.fuhr.org>
Permalink:  ../20051208075500.GA12878@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20051208075500.GA12878@winnie.fuhr.org

 · 

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-admin@postgresql.org
  Cc: mike@fuhr.org, barai@cs.ucr.edu
  Subject: Re: Backing up views, functions
  In-Reply-To: <20051208075500.GA12878@winnie.fuhr.org>
  References: <4397D871.20208@cs.ucr.edu> <20051208075500.GA12878@winnie.fuhr.org>

* 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