From: | Frank <farocco(at)verizon(dot)net> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org>, aly(dot)dharshi(at)telus(dot)net |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: newbie - postgresql or mysql |
Date: | 2005-09-01 18:02:18 |
Message-ID: | 6.2.3.4.0.20050901140053.01d13778@incoming.verizon.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>>mysqldump --extended-insert=FALSE<<
Thanks for the help, this is allowing me to import the data now.
Regards,
Frank
At 09:37 AM 9/1/2005, Michael Fuhr wrote:
>[Please copy the mailing list on replies so others can contribute
>to and learn from the discussion. Also, please don't top-post, as
>it destroys the flow of the discussion; I've moved your questions
>to a more logical place.]
>
>On Wed, Aug 31, 2005 at 03:49:57PM -0600, aly(dot)dharshi(at)telus(dot)net wrote:
> > On Wed, 31 Aug 2005, Michael Fuhr wrote:
> > >On Wed, Aug 31, 2005 at 03:17:29PM -0400, Frank wrote:
> > >>>>insert into category values
> > >>>>(4, 'Hardware - Monitor', 2, '2004-10-12 10:50:01'),
> > >>>>(5, 'Hardware - Printer', 2, '2004-10-12 10:50:02'),
> > >>>>(6, 'Hardware - Terminal', 2, '2004-10-12 10:50:02'),
> > >
> > >PostgreSQL doesn't support this form of INSERT; you'll have to use
> > >a separate INSERT per record or use COPY. Another method, although
> > >probably not useful in this case, is to insert records from a subquery;
> > >see the INSERT documentation for more information.
> >
> > Wouldn't it be simpler to do a dblink, and just get the data from MySQL
> > and drop it into PostgreSQL ? Or is this too complicated ?
>
>dblink (at least the one distributed as contrib/dblink) is for
>making connections to other PostgreSQL databases. You could,
>however, use DBI-Link or something similar to make connections to
>MySQL or another data source; in that case you could use the subquery
>form of INSERT:
>
>INSERT INTO tablename (columnlist) SELECT columnlist FROM ... ;
>
>However, if you're just doing a one-time import of data from MySQL,
>then it might be simplest to dump the data with separate INSERT
>statements (mysqldump --extended-insert=FALSE).
>
>--
>Michael Fuhr
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: Don't 'kill -9' the postmaster
From | Date | Subject | |
---|---|---|---|
Next Message | Casey T. Deccio | 2005-09-01 18:06:00 | Re: Transaction error |
Previous Message | marcelo Cortez | 2005-09-01 17:13:36 | lock problem |