Re: pg_dump problem - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: pg_dump problem
Date
Msg-id 20000727120017.E5485@bpl.on.ca
Whole thread Raw
In response to pg_dump problem  ("Oakley " <oakerz@eudoramail.com>)
Responses Re: pg_dump problem  (Kyle <kaf@nwlink.com>)
List pgsql-general
On Thu, Jul 27, 2000 at 09:53:45AM -0500, Oakley   wrote:

> /usr/local/pgsql/bin/pg_dump -u dbname > /some_directory/dbname.dump
>
> it wont work! It doesnt prompt me for username and passwd or
> anything, and still creates the dbname.dump file in the specified
> directory, but it has "0" size and I never return to prompt unless
> I hit Ctrl-C. If I leave off the redirect and have it print to
> STDOUT, no problems...

If you just type the username and password after that, you'll get the
output you want.  Problem is that you're redirecting all output to a
file, and that includes the username and password prompts.

In 7.x versions, this appears to be fixed using the '-f' switch:

    mymachine:~$ pg_dump -u [database] -f [somefile]

A

--
Andrew Sullivan                                      Computer Services
<sullivana@bpl.on.ca>                        Burlington Public Library
+1 905 639 3611 x158                                   2331 New Street
                                   Burlington, Ontario, Canada L7R 1J4

pgsql-general by date:

Previous
From: Merlijn van der Mee
Date:
Subject: Re: pg_dump problem
Next
From: Philip Warner
Date:
Subject: Re: pg_dump problem