Thread: Re: input from a file

Re: input from a file

From
"Eric Naujock "
Date:
Just pipe the file into place.

psql mydatabase < mysqldumpfile.sql

If your account is the one that created the database or your on the postgres account then this should work.

Note there are some subtle differences between the sql that each database will accept. I believe that on the Postgresql
websitesthere is an article on converting a mysql dump to work for importing into postgresql. 

--------------------------------------------------------------------------------
Eric Naujock  CCNA, CCDA, A+, Network +, I-Net +
Abacus II
5610 Monroe St.
Sylvania, Ohio 43560
<http://www.abacusii.com>
E-mail - naujocke@abacusii.com
Phone - 419-885-0082  X 241
Fax : 419-885-2717
AOL IM: erlic

>>> "Stephen M. Ford" <sford@Eng.Auburn.EDU> 05/03/01 12:29PM >>>
I have a dump from a msql database into a file and would like postgre to build the tables and insert the data into
thosetables.  How do I go about getting postgre to read commands from a file?  



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


Attachment