Unix Technical Forum

Migrating MySQL app to postgres?

This is a discussion on Migrating MySQL app to postgres? within the Pgsql General forums, part of the PostgreSQL category; --> I need (and want) contact managment software for marketing/sales tracking in my business. The only linux app I can ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 08:40 PM
Rich Shepard
 
Posts: n/a
Default Migrating MySQL app to postgres?

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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 08:40 PM
Joshua D. Drake
 
Posts: n/a
Default Re: Migrating MySQL app to postgres?

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/

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 08:40 PM
Rich Shepard
 
Posts: n/a
Default Re: Migrating MySQL app to postgres?

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 08:40 PM
Scott Marlowe
 
Posts: n/a
Default Re: Migrating MySQL app to postgres?

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.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 08:40 PM
Rich Shepard
 
Posts: n/a
Default Re: Migrating MySQL app to postgres?

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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-08-2008, 08:40 PM
Scott Marlowe
 
Posts: n/a
Default Re: Migrating MySQL app to postgres?

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.

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-08-2008, 08:40 PM
Joshua D. Drake
 
Posts: n/a
Default Re: Migrating MySQL app 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


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/

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-08-2008, 08:40 PM
Rich Shepard
 
Posts: n/a
Default Re: Migrating MySQL app to postgres?

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@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-08-2008, 08:40 PM
Chris Browne
 
Posts: n/a
Default Re: Migrating MySQL app to postgres?

rshepard@appl-ecosys.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@~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/>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-08-2008, 08:40 PM
Rich Shepard
 
Posts: n/a
Default Re: Migrating MySQL app to postgres?

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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:11 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com