pg_dump -> \i infile

From: Erik Price <eprice(at)ptc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_dump -> \i infile
Date: 2003-06-10 22:26:29
Message-ID: 3EE65B15.6040508@ptc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-- please CC me b/c I could not subscribe (the site's subscription
interface seems to be down) --

I am doing some unit testing of my application code, which requires me
to often reset my Postgres 7.3.2 (Cygwin) development database to
certain known data. The problem that I am running into seems to be
this: if I try to load a database (schema and data) using the
"\i filename" command in psql, it fails. However, it works fine when I
try to load the exact same file from outside of the psql client (i.e.,
my bash shell in Cygwin) using the "psql -d databasename -f filename"
command.

Is there a way to get a file dumped from postgres using pg_dump to be
read using the "\i" command? If not, is there a way to export the
database (schema and data) to a format that can be read from the "\i"
command?

Regards,

Erik

PS: please CC me

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Snyder 2003-06-10 22:50:27 error restoring large objects during pg_restore
Previous Message Tom Lane 2003-06-10 22:00:31 Re: [GENERAL] Weird postmaster crashes