[Mailman-Developers] Mailman + PostgreSQL

Dave Klingler davek@mail.commercedata.com
Wed, 21 Feb 2001 16:20:40 -0700 (MST)


Hi Chris.  

On Wed, 21 Feb 2001 08:32:44 -0500 Chris Ryan <chris@greatbridge.com> wrote:
> Hello all,
> 
> 	I've been using Mailman on our web site for open source development of
> "serious business software." http://www.greatbridge.org/. We are
> interested in seeing Mailman have a PostgreSQL database back end (and
> further in the future PHP front end web tools.)  I have been given
> permission to start working on this as soon as I have completed my
> current project (should be done this week).

I think that's very cool.  I've been trying to work toward that myself.  I
brought up Mailman on a virtfs machine (virtfs is a script package that uses
chroot to create virtual servers) last month in conjunction with two websites
based on PHP, PostgreSQL, and Perl.  The finished product was a bear to get
working, and I'm hoping to go back and replace a fair portion of it with a 
PHP/Postgres backend.  Mailman is not very friendly to chrooted environments
because the configuration information is hard-coded into so many different
scripts.

My suggestion would be to use an abstraction layer similar to the one that
Tim Perdue uses on SourceForge with PHP, if not the one he actually uses.
Tim was able to switch SourceForge and PHPBuilder over from MySQL to 
Postgres pretty quickly, and I found that impressive.

I haven't begun this process yet.  I'll be interested to follow what you're
doing, and maybe at some point I'll be able to help out.  Chuq has also 
mentioned working on a database backend, possibly with Apple's Enterprise
Object Frameworks.

I've thought about just working my way through the scripts in the cgi-bin
directory, giving them all the same names and arguments but rewriting them
in PHP or Python to use Postgres instead.  I hate to mix PHP with Python, but 
PHP does seem to work very nicely for web apps.  I'd just be grateful to have 
it all working reliably instead of breaking every time I need to change 
something.  I've got something going on right now that causes my webscripts
to go off to lunch without leaving anything in the error log.  Darn it.
  
> 	I've started to familiarize myself with the general flow of Mailman. I
> have not had a chance to get into the current data handling classes but,
> correct me if i'm wrong, I believe modifying the code to use a database
> should be fairly contained. In the process of doing this I want to do
> everything in a such a manner that is best for contributing back to the
> Mailman project.

There's a nice list of all the PHP Postgres functions at 
www.php.net/manual/en/ref.pgsql.php (in about the middle of the page).  I had
looked at that list and thought that it made a nice start for an abstraction
layer, whether written in PHP or Python.

Good luck!
Dave Klingler