Re: Need Help!!

From: "Heather Johnson" <hjohnson(at)nypost(dot)com>
To: "Gurudutt" <guru(at)indvalley(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Cc: <pgsql-php(at)postgresql(dot)org>
Subject: Re: Need Help!!
Date: 2001-10-04 14:17:28
Message-ID: 004f01c14cdf$4c7db7d0$510b10ac@sephie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php pgsql-sql

Hi Gurudutt--

Concerning #1, I had a similar problem when porting data from mysql to psql.
I finally ended up just using mysql's COPY command to get the data into
delimited text form, then imported that into psql using its COPY command.
This seems to me to be the easiest way to port over data if your table
structures are exactly the same. If they aren't, then I'd export the mysql
data to delimited text anyway, and write a quick script to import it into a
structurally distinct psql table.

I don't have any good advice for the other two difficulties you're
having---hopefully others on the list can help.

Good luck.
Heather

----- Original Message -----
From: "Gurudutt" <guru(at)indvalley(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Cc: <pgsql-php(at)postgresql(dot)org>
Sent: Monday, May 21, 2001 10:09 AM
Subject: [PHP] Need Help!!

> Hello pgsql-sql,
>
> I am the new member for the postgres mailing list. Actually I have
> been working with mysql, php and perl for a very long time now, and
> offlate shifted to pgsql. I have many technical difficulties
>
> 1. I need to port mysql data to pgsql. I tried both mysql2pg.pl and
> my2pg.sql. Both have some problem. I think it is got something to do
> with the auto increment feature that i used in mysql. Can that issue
> be addressed while porting.
>
> 2. Some of the joins that were successfully working in mysql are not
> working, most importantly LEFT JOIN.
>
> eg.
>
> SELECT SUM(ACT_DueTab.CableAmount) as NetworkTotal FROM
> ACT_NetworkTab,ACT_DueTab, ACT_InvoiceTab LEFT JOIN ACT_CustomerTab ON
> (ACT_CustomerTab.CustCode=ACT_InvoiceTab.CustCode) WHERE
> ACT_DueTab.InvCode=ACT_InvoiceTab.InvNumber and
> ACT_NetworkTab.NetCode=3 and
> ACT_CustomerTab.NetCode=ACT_NetworkTab.NetCode and
> (ACT_InvoiceTab.InvGenDate <= '2001-08-31' and
> ACT_InvoiceTab.InvGenDate >= '2001-08-01')
> ORDER BY ACT_InvoiceTab.InvGenDate DESC
>
> This query works fine in mysql, but suffers in pgsql.
>
> 3. I was using PEAR for data abstraction layer ( to make code
> independent of the database), I find that PEAR which worked fine with
> mysql doesn't work so well with pgsql
>
>
> Any help on all these issues will be greatly appreciated. I am in the
> midst of a porject porting exercise.
>
>
> --
> Best regards,
> Gurudutt mailto:guru(at)indvalley(dot)com
>
> Life is not fair - get used to it.
> Bill Gates
>
>
> ---------------------------(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)

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Ross J. Reedstrom 2001-10-04 22:33:56 Re: Need Help!!
Previous Message Adam Lang 2001-10-04 13:07:45 Re: persistent vs. non-persistent

Browse pgsql-sql by date

  From Date Subject
Next Message Michael D. Harlan 2001-10-04 14:27:12 SQL Syntax / Logic question
Previous Message Christopher Sawtell 2001-10-04 12:46:01 Re: