Thread

  1. Re: input from a file

    Eric Naujock <naujocke@abacusii.com> — 2001-05-03T19:17:20Z

    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 websites there 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 those tables.  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)