Re: import a .out file - Mailing list pgsql-novice

From A Gilmore
Subject Re: import a .out file
Date
Msg-id 46EB83E4.4040501@shaw.ca
Whole thread Raw
In response to Re: import a .out file  (A Gilmore <agilmore@shaw.ca>)
List pgsql-novice
Just a follow-up, scratch that, I confused this message as being on a
different list, local to my area and non-pgsql related.  Oops.

Apologies all,
- Adrien


A Gilmore wrote:
> 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@yahoo.com] Sent: Friday,
>> September 14, 2007 1:59 PM
>> To: Jonathon Stierman; pgsql-novice@postgresql.org
>> Subject: Re: [NOVICE] import a .out file
>>
>> --- Jonathon Stierman <jonathon@vimm.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
>>
>
> ---------------------------(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
>

pgsql-novice by date:

Previous
From: A Gilmore
Date:
Subject: Re: import a .out file
Next
From: "Michael Aroustian"
Date:
Subject: installation issues