Re: Migrating MySQL app to postgres?

Lists: pgsql-general
From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Migrating MySQL app to postgres?
Date: 2005-04-22 16:18:14
Message-ID: Pine.LNX.4.61.0504220915530.10539@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I need (and want) contact managment software for marketing/sales tracking
in my business. The only linux app I can find that does the job is SugarCRM.
However, they use mysql as their backend.

Might it be relatively easy for me to change the code so it will work with
postgres? What's involved?

TIA,

Rich

--
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 16:51:37
Message-ID: 42692B99.2010401@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Rich Shepard wrote:
> I need (and want) contact managment software for marketing/sales tracking
> in my business. The only linux app I can find that does the job is
> SugarCRM.
> However, they use mysql as their backend.
>
> Might it be relatively easy for me to change the code so it will work
> with
> postgres? What's involved?

Depends on how it was written. If they used Pear it shouldn't be "too"
difficult. It will take work no matter what.

Sincerely,

Joshua D. Drake

>
> TIA,
>
> Rich
>

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 17:04:40
Message-ID: Pine.LNX.4.61.0504221003490.10539@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Fri, 22 Apr 2005, Joshua D. Drake wrote:

> Depends on how it was written. If they used Pear it shouldn't be "too"
> difficult. It will take work no matter what.

Thanks, Josh. I should have mentioned that it's written using php as the
middleware.

Rich

--
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863


From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 17:07:05
Message-ID: 1114189625.13303.69.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Fri, 2005-04-22 at 11:51, Joshua D. Drake wrote:
> Rich Shepard wrote:
> > I need (and want) contact managment software for marketing/sales tracking
> > in my business. The only linux app I can find that does the job is
> > SugarCRM.
> > However, they use mysql as their backend.
> >
> > Might it be relatively easy for me to change the code so it will work
> > with
> > postgres? What's involved?
>
> Depends on how it was written. If they used Pear it shouldn't be "too"
> difficult. It will take work no matter what.

Unfortunately, there is no use of an abstraction layer in SugarCRM, and
the few comments I found in their forum about alternate databases
indicated a current focus on feature enhancements and sales / services,
not supporting alternate databases.

I do get the feeling it's in the plans, but won't likely happen this go
around, with 3.0 beta.

I would say that the problem isn't that it doesn't support PostgreSQL,
but that it ONLY supports MySQL, which means it may be hard to port to
other databases due to extensive uses of "mysqlisms" which are common in
large mysql only databases, and the longer they wait to abstract out the
db access, the harder the conversion becomes.


From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 17:27:28
Message-ID: Pine.LNX.4.61.0504221022300.10539@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Fri, 22 Apr 2005, Scott Marlowe wrote:

> Unfortunately, there is no use of an abstraction layer in SugarCRM, and the
> few comments I found in their forum about alternate databases indicated a
> current focus on feature enhancements and sales / services, not supporting
> alternate databases.

Scott,

Thanks for the insight. Up until the mid-1990s (when I migrated from DOS to
linux), I used my own CRM written in Paradox. I tuned it over time to do
everything I wanted, and it was open and used every day. I just never did
port that to postgres.

Guess now's the time. I'm trying to find a copy of pygresql to use, but
it's not easy (www.pygresql.org leads to druid.net and there's nothing on the
page about pygresql). I'm learning python to use on a major project here (but
the core libraries will remain in C) so I'd like to use that for the UI on
this project, too. I'm still not sure about the reports, but one step at a
time. That is, will the pygresql display nicely formatted reports based on
sql queries to the backend? Need to find out.

Again, thanks,

Rich

--
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863


From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 17:48:11
Message-ID: 1114192091.13303.73.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Fri, 2005-04-22 at 12:27, Rich Shepard wrote:
> On Fri, 22 Apr 2005, Scott Marlowe wrote:
>
> > Unfortunately, there is no use of an abstraction layer in SugarCRM, and the
> > few comments I found in their forum about alternate databases indicated a
> > current focus on feature enhancements and sales / services, not supporting
> > alternate databases.
>
> Scott,
>
> Thanks for the insight. Up until the mid-1990s (when I migrated from DOS to
> linux), I used my own CRM written in Paradox. I tuned it over time to do
> everything I wanted, and it was open and used every day. I just never did
> port that to postgres.
>
> Guess now's the time. I'm trying to find a copy of pygresql to use, but
> it's not easy (www.pygresql.org leads to druid.net and there's nothing on the
> page about pygresql). I'm learning python to use on a major project here (but
> the core libraries will remain in C) so I'd like to use that for the UI on
> this project, too. I'm still not sure about the reports, but one step at a
> time. That is, will the pygresql display nicely formatted reports based on
> sql queries to the backend? Need to find out.

Good luck with it. Have you considered doing the project in another
language? I like Python, but it's felt half-finished for quite some
time now. So, I use PHP and / or Java (just learning it really) for
most stuff.

Of course, Java's felt half finished most of its life to me as well, but
it's finally feeling mature.

PHP, for all it's warts and blemishes, has been a stable language (not
the definition, the VM / implementation) with usable connect libs for
quite some time. IF you're an old C programmer, it's quite easy to
write readable / maintainable code. If you're a beginner, it's a pretty
good way to learn REALLY bad habits...

Ruby on Rails has promise, but also feels like it's really just getting
started.


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 17:50:42
Message-ID: 42693972.8070704@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

>
> Guess now's the time. I'm trying to find a copy of pygresql to use, but
> it's not easy (www.pygresql.org leads to druid.net and there's nothing
> on the
> page about pygresql). I'm learning python to use on a major project here

Use pyscopg instead of pygresql.

Sincerely,

Joshua D. Drake
>

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 17:55:21
Message-ID: Pine.LNX.4.61.0504221053350.10539@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Fri, 22 Apr 2005, Scott Marlowe wrote:

> I like Python, but it's felt half-finished for quite some time now. So, I
> use PHP and / or Java (just learning it really) for most stuff.
>
> PHP, for all it's warts and blemishes, has been a stable language (not
> the definition, the VM / implementation) with usable connect libs for
> quite some time.
>
> Ruby on Rails has promise, but also feels like it's really just getting
> started.

I don't make my living writing software so I'm neither a language bigot nor
a language collector. If it works, it's good enough. :-)

Thanks,

Rich

--
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863


From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 19:04:59
Message-ID: 60acnq1vl0.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

rshepard(at)appl-ecosys(dot)com (Rich Shepard) writes:
> I need (and want) contact managment software for marketing/sales
> tracking in my business. The only linux app I can find that does the
> job is SugarCRM. However, they use mysql as their backend.
>
> Might it be relatively easy for me to change the code so it will
> work with postgres? What's involved?

It generally starts with seeing if the code has nonportable bits, such
as queries that are "MySQL SQL" that aren't really SQL.

If there's a lot of that, you'll need to do some rewriting; how tough
that will be will depend on how deeply the application logic depends
on MySQL's logic.

If the vendor has done a great deal of work to tune their application
to the way MySQL works, then this will be a seriously irritating
chore.

That's something we have seen with RT/3; it was initially written for
MySQL, and the requirement of continuing compatibility means that the
authors are unable to accept the sorts of SQL changes that lead to
some queries running hundreds of times faster because the jump to
better use of SQL would break operability with MySQL.
--
(format nil "~S(at)~S" "cbbrowne" "acm.org")
http://www.ntlug.org/~cbbrowne/sap.html
Rules of the Evil Overlord #78. "I will not tell my Legions of Terror
"And he must be taken alive!" The command will be: ``And try to take
him alive if it is reasonably practical.''"
<http://www.eviloverlord.com/>


From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 20:16:29
Message-ID: Pine.LNX.4.61.0504221315190.19980@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Fri, 22 Apr 2005, Chris Browne wrote:

> It generally starts with seeing if the code has nonportable bits, such
> as queries that are "MySQL SQL" that aren't really SQL.

Thanks, Chris.

I learned of AnteilCRM and will be using that just as soon as I figure out
a php error so I can restart httpd.

Rich

--
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863


From: Guy Fraser <guy(at)incentre(dot)net>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 20:21:45
Message-ID: 1114201306.4929.196.camel@sigurd.incentre.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

One of my associates swears SMARTY is the best thing since sliced
bread. I think it uses PHP an PEAR, but is more abstract. I looked
at it and it did some cool things with only a few lines of code.

Being an old dog, I have built many different "libraries" in C
and PHP and prefer to use them. The last project I worked on,
we made it so it could be used with MySQL, but was primarily
designed to work with PostgreSQL. I don't like MySQL, and I
was the primary developer.

Give smarty a look.

On Fri, 2005-22-04 at 10:27 -0700, Rich Shepard wrote:
> On Fri, 22 Apr 2005, Scott Marlowe wrote:
>
> > Unfortunately, there is no use of an abstraction layer in SugarCRM, and the
> > few comments I found in their forum about alternate databases indicated a
> > current focus on feature enhancements and sales / services, not supporting
> > alternate databases.
>
> Scott,
>
> Thanks for the insight. Up until the mid-1990s (when I migrated from DOS to
> linux), I used my own CRM written in Paradox. I tuned it over time to do
> everything I wanted, and it was open and used every day. I just never did
> port that to postgres.
>
> Guess now's the time. I'm trying to find a copy of pygresql to use, but
> it's not easy (www.pygresql.org leads to druid.net and there's nothing on the
> page about pygresql). I'm learning python to use on a major project here (but
> the core libraries will remain in C) so I'd like to use that for the UI on
> this project, too. I'm still not sure about the reports, but one step at a
> time. That is, will the pygresql display nicely formatted reports based on
> sql queries to the backend? Need to find out.
>
> Again, thanks,
>
> Rich


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Guy Fraser <guy(at)incentre(dot)net>
Cc: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 20:29:31
Message-ID: 42695EAB.9060109@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Guy Fraser wrote:
> One of my associates swears SMARTY is the best thing since sliced
> bread. I think it uses PHP an PEAR, but is more abstract. I looked
> at it and it did some cool things with only a few lines of code.

Smarty is nice. However unless you run an optimizer it is slower than
snot. PEAR doesn't help the situation either.

Sincerely,

Joshua D. Drake

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: Guy Fraser <guy(at)incentre(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 20:30:17
Message-ID: Pine.LNX.4.61.0504221329100.19980@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Fri, 22 Apr 2005, Guy Fraser wrote:

> One of my associates swears SMARTY is the best thing since sliced bread. I
> think it uses PHP an PEAR, but is more abstract. I looked at it and it did
> some cool things with only a few lines of code.

Thanks, Guy. I'll use Anteil OpenCMS and see how I like it. Can always
modify that, too. Otherwise, I'll probably roll my own with python and
postgres.

Rich

--
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863


From: David Roussel <diroussel(at)xsmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 22:29:24
Message-ID: e97539369b0ce87be11d27f57e0036c9@xsmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> The only linux app I can find that does the job is SugarCRM.
> However, they use mysql as their backend. Might it be relatively
> easy for me to change the code so it will work with
> postgres? What's involved?
>

Rich, what's wrong with the app as it is? Why change anything?


From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: David Roussel <diroussel(at)xsmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-22 22:32:11
Message-ID: Pine.LNX.4.61.0504221530310.19980@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 22 Apr 2005, David Roussel wrote:

> Rich, what's wrong with the app as it is? Why change anything?

David,

Because I don't have MySQL installed, have no need for it, and have used
postgres for about eight years so I know it well.

Rich

- --
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFCaXtzugEIjC001L0RAt03AJ9nU0Vp2Ite2Zku4pm15jruZn2AnACfeX0u
OKZYu2CfLdLqLElRHfsD0Nw=
=1ueS
-----END PGP SIGNATURE-----


From: Joe Healy <joe(at)omc-international(dot)com(dot)au>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-26 04:03:30
Message-ID: 426DBD92.8010205@omc-international.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


Hi Rich,

>
> Guess now's the time. I'm trying to find a copy of pygresql to use, but
> it's not easy (www.pygresql.org leads to druid.net and there's nothing
> on the
> page about pygresql). I'm learning python to use on a major project
> here (but
> the core libraries will remain in C) so I'd like to use that for the
> UI on
> this project, too. I'm still not sure about the reports, but one step
> at a
> time. That is, will the pygresql display nicely formatted reports
> based on
> sql queries to the backend? Need to find out.

I have found using python with reportlab
(http://www.reportlab.org/rl_toolkit.html)
very easy to create pdf reports based on queries.

Hope this helps,

Joe


From: Alex Turner <armtuk(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-26 06:05:17
Message-ID: 33c6269f050425230562466163@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Be warned that if you use python, expect it to be slow. Many basic
associative array operations are more than 10x slower than C++'s
comparative operations leading to long page execution time if you are
dealing with alot of data. I have written a simple web framework in
Python and XML, and it's a nice language, but it is slow in places. I
should mention that string manipulation in python is faster than the
C++ string class though.

I can't stand PHP anymore because they just keep changing it
underneath me, and I can't do anything about it. I'm one frustated
X-PHPer. Moving all to mod_python and taking on the chin with the
performance hit.

Alex Turner
netEconomist

On 4/22/05, Rich Shepard <rshepard(at)appl-ecosys(dot)com> wrote:
> On Fri, 22 Apr 2005, Scott Marlowe wrote:
>
> > I like Python, but it's felt half-finished for quite some time now. So, I
> > use PHP and / or Java (just learning it really) for most stuff.
> >
> > PHP, for all it's warts and blemishes, has been a stable language (not
> > the definition, the VM / implementation) with usable connect libs for
> > quite some time.
> >
> > Ruby on Rails has promise, but also feels like it's really just getting
> > started.
>
> I don't make my living writing software so I'm neither a language bigot nor
> a language collector. If it works, it's good enough. :-)
>
> Thanks,
>
> Rich
>
> --
> Dr. Richard B. Shepard, President
> Applied Ecosystem Services, Inc. (TM)
> <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>


From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Migrating MySQL app to postgres?
Date: 2005-04-26 13:24:43
Message-ID: Pine.LNX.4.61.0504260623280.22922@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Tue, 26 Apr 2005, Joe Healy wrote:

> I have found using python with reportlab
> (http://www.reportlab.org/rl_toolkit.html) very easy to create pdf reports
> based on queries.

Joe,

Thank you very much. I'll look at it. Yesterday I discovered another report
writer (uses python) called "papryrus" that also looks quite robust and
useful.

Rich

--
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863