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.kla...@gmail.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to