pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ciprian.hodorogea@bitsp.com
Cc: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_dump - txt sql vs binary
Date: Mon, 23 Jan 2006 12:23:05 -0500
Message-ID: <6688.1138036985@sss.pgh.pa.us> (raw)
In-Reply-To: <43D5091C.9010608@bitsp.com>
References: <20060122204132.9567D14DB13@mail07.powweb.com>
	<22930.1137973880@sss.pgh.pa.us>
	<43D4E9A8.8050005@bitsp.com>
	<20060123155729.GA23544@winnie.fuhr.org>
	<43D5091C.9010608@bitsp.com>

Ciprian Hodorogea <ciprian.hodorogea@bitsp.com> writes:
> This will put in the output SQL file postgres functions also (not only 
> those defined by me), for example:

> CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler
>      AS '$libdir/plpgsql', 'plpgsql_call_handler'
>      LANGUAGE c;

> CREATE TYPE tablefunc_crosstab_2 AS (
> 	row_name text,
> 	category_1 text,
> 	category_2 text
> );

> CREATE FUNCTION connectby(text, text, text, text, integer, text) RETURNS 
> SETOF record
>      AS '$libdir/tablefunc', 'connectby_text'
>      LANGUAGE c STABLE STRICT;


Those *were* all defined by you, at some point, because they aren't
preloaded in the system.  Perhaps you have forgotten running the
contrib-module installation scripts, but you evidently did.

If you are having difficulty in reloading the definitions it suggests
that your new installation is lacking the contrib modules.  You could
install them, or manually remove the unwanted stuff from the dump file,
or drop the functions from the source installation before making a dump.
(Some but not all of the contrib modules have "uninstall" scripts, which
would help with the last alternative.)

> Anyway, my question would be: if I have postgres 8.1.x installed on 
> computer A and the same version of postgres installed on computer B, 
> which would be your recommended way of backing up data on computer A and 
> put it on computer B?

pg_dump is certainly the preferred method.

			regards, tom lane



view thread (10+ messages)  latest in thread

Message-ID: <6688.1138036985@sss.pgh.pa.us>
Permalink:  ../6688.1138036985@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6688.1138036985@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, ciprian.hodorogea@bitsp.com, mike@fuhr.org
  Subject: Re: pg_dump - txt sql vs binary
  In-Reply-To: <6688.1138036985@sss.pgh.pa.us>
  References: <20060122204132.9567D14DB13@mail07.powweb.com> <22930.1137973880@sss.pgh.pa.us> <43D4E9A8.8050005@bitsp.com> <20060123155729.GA23544@winnie.fuhr.org> <43D5091C.9010608@bitsp.com> <6688.1138036985@sss.pgh.pa.us>

* 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