Re: pg_backup symlink?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_backup symlink?
Date: 2000-07-12 00:23:23
Message-ID: Pine.LNX.4.21.0007120033330.350-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Philip Warner writes:

> Is there a good solution? It dumps to text for compatibility with the old
> pg_dump, but I will most often use 'pg_dump -Fc --blob'. Is there a
> recommended 'correct' approach?

IMHO, it's a bad strategy to add symlinks as shortcuts to certain
options. Where would that ever lead? There are tons of options settings I
use "most often" in various programs, but for that you can use shells
aliases or scripts, or the program provides an environment variable for
default options.

The default behaviour of pg_dump (or pg_backup or whatever) should be to
write plain text to stdout. If you want to write format "foo", use the
-Ffoo option. If you want to dump blobs, use the --blob option. That makes
sense.

You're really trying to force certain usage patterns by labeling one
invocation "backup" and another "dump". I can foresee the user problems:
"No, you have to use pg_dump for that, not pg_backup!" -- "Don't they do
the same thing?" -- "Why aren't they the same program then?" We're still
battling that sympton in the createdb vs CREATE DATABASE case.

What's wrong with just having pg_dump, period? After all pg_dump isn't
something you use like `ls' or `cat' where every extra keystroke is a
pain.

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-general by date

  From Date Subject
Next Message ryan 2000-07-12 00:29:07 Stored Procedure warnings
Previous Message Cesar A. K. Grossmann 2000-07-12 00:21:10 Re: INSERT ... SELECT DISTINCT - Doesn't work...

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-07-12 00:23:34 Installation
Previous Message Chris Bitmead 2000-07-12 00:07:13 Re: Slashdot discussion