Re: import a .out file

From: A Gilmore <agilmore(at)shaw(dot)ca>
To: Jonathon Stierman <jonathon(at)vimm(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: import a .out file
Date: 2007-09-15 06:55:06
Message-ID: 46EB81CA.6030006@shaw.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Going just on the few details provided, what I think would probably work
best in this case :

- Get copy of postgresql up and running with the data
- Make a schema dump
- Make a data dump
- Load the schema into mysql or failing that recreate it manually
- Load the data - this shouldn't take much tweaking

The data dump you were given may have not been set to use INSERT
commands, which may cause problems, I'm not sure if mysql supports COPY.

I've been working with postgresql everyday for a couple years now if
you'd like to pay me to produce a mysql dump from your postgresql dump,
email me directly. That said, I'll still of course offer any help I can
on list.

- Adrien

Jonathon Stierman wrote:
> Most of that 58 megs is data. One table alone has 200k records, which is
> most of the file...
>
> So I think this is going to be my easiest route -- cutting out the record
> inserts and then writing/running a MSSQL-friendly script to get the data
> into it's new home. Since there are relatively few tables, I can afford to
> write a few translator scripts in my favorite programming language.
>
> Thanks all for your help with this! I really do need to expand my
> PostGreSQL horizons -- I'm surprised I've lasted these 3 years in
> development without running across it before.
>
> Thanks again, guys!
>
> Jonathon
>
>
> -----Original Message-----
> From: Richard Broersma Jr [mailto:rabroersma(at)yahoo(dot)com]
> Sent: Friday, September 14, 2007 1:59 PM
> To: Jonathon Stierman; pgsql-novice(at)postgresql(dot)org
> Subject: Re: [NOVICE] import a .out file
>
> --- Jonathon Stierman <jonathon(at)vimm(dot)com> wrote:
>
>> Yep, it definitely is a SQL dump -- it looks much the same as .sql
>> files that I'm used to dealing with on MYSQL databases.
>>
>> Do you have any favorite translator tools that I could look in to?
>> The file is massive (58 megs worth) and going through it by hand would
>> be quite tedious.
>
> I bet most of the 58MB are just data. If you can, see if you get get
> another dump of only the db SCHEMA. This is what you should take a look at
> first. I would look at the datatype and any constraints and compare what
> the other DB support.
>
> If you only care about the tables and data, you could also "suck" these
> tables into MS-Access using ODBC. Next you could rebuild the relationship
> that existed in PostgreSQL. From this point I see that MS SQL server has
> help docs on how to port MS-Access to MS-SQL Server.
>
> Regards,
> Richard Broersma Jr.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message A Gilmore 2007-09-15 07:04:04 Re: import a .out file
Previous Message Jonathon Stierman 2007-09-14 19:40:30 Re: import a .out file