Re: .dmp files in postgresql

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Alpha Beta <dzjitaru(at)gmail(dot)com>
Subject: Re: .dmp files in postgresql
Date: 2011-11-25 22:29:05
Message-ID: 201111251429.05891.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, November 25, 2011 12:04:38 pm Alpha Beta wrote:
> Hi list,
>
> I have got two files (template1.dmp, example1.dmp) and I want to open them
> in postgresql, I tried the following commands:
>
> - Import *template1 *:
> * createdb -U postgres template1
> * psql -U postgres template1 < template1.dmp
>
> - Create the sample of the database:
> * createdb -U postgres example1
> * psql -U postgres example1 < example1.dmp
>
> I've got no error reported by postgres but nothing happened either.
> How should I proceed exactly? Sorry I'm a newbie with PostgreSQL :)

How where the *.dmp files created?

Also from below you might want to use -f to designate the file:

http://www.postgresql.org/docs/9.0/interactive/app-psql.html
"
-f filename
--file filename

Use the file filename as the source of commands instead of reading commands
interactively. After the file is processed, psql terminates. This is in many ways
equivalent to the internal command \i.

If filename is - (hyphen), then standard input is read.

Using this option is subtly different from writing psql < filename. In
general, both will do what you expect, but using -f enables some nice features
such as error messages with line numbers. There is also a slight chance that
using this option will reduce the start-up overhead. On the other hand, the
variant using the shell's input redirection is (in theory) guaranteed to yield
exactly the same output you would have received had you entered everything by
hand.
"

>
> Regards!

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-11-25 22:42:01 Re: How to add conversion between LATIN1 and WIN1251 ?
Previous Message Thom Brown 2011-11-25 20:39:20 Re: .dmp files in postgresql