Re: input from a file

From: "Eric Naujock " <naujocke(at)abacusii(dot)com>
To: <sford(at)Eng(dot)Auburn(dot)EDU>
Cc: "<"<pgsql-novice(at)postgresql(dot)org>
Subject: Re: input from a file
Date: 2001-05-03 19:17:20
Message-ID: saf17690.058@gw5.abacusii.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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(at)abacusii(dot)com
Phone - 419-885-0082 X 241
Fax : 419-885-2717
AOL IM: erlic

>>> "Stephen M. Ford" <sford(at)Eng(dot)Auburn(dot)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(at)postgresql(dot)org)

Attachment Content-Type Size
Eric Naujock .vcf text/x-vcard 480 bytes

Browse pgsql-novice by date

  From Date Subject
Next Message Justin Seiferth 2001-05-03 21:53:35 VARCHAR references
Previous Message Joel Burton 2001-05-03 18:46:45 Re: input from a file