On Sep 27, 2011, at 12:44 AM, Stephen A. Goss wrote: >I've attached a branch with the Postgres support code that I've cooked >up.
Fantastic, thanks! Do be sure to add a merge proposal. >3. There is now an alternate mailman_pg.sql file which is used to create >the tables. Currently, two foreign key constraints are commented out >because those are violated in Mailman 3 (apparently this doesn't bother >SQLite). Some column TYPES are different from mailman.sql. Classes are >created in a slightly different order due to FK constraint creation >requires the referenced table to actually exist. The primary key indexes >defined after each class are probably redundant, as those are created >automatically for SERIAL columns defined as PRIMARY KEY in Postgres. Do you have any thoughts on whether the two .sql files can possibly be shared? My biggest concern is that it will be difficult-ish to keep them in sync as I add or modify the SQLite version. If it's not possible, so be it. I took a quick look at the Python changes, and I think I'm going to refactor the code to not hardcode so much in stock.py. For example, I'll probably rename StockDatabase to SQLiteDatabase and add a PostgresDatabase class, adding a common super class. That way, you'd only need to put this in your mailman.cfg file: [database] class: mailman.database.postgres.PostgresDatabase Don't worry about that too much, I can make that change when I merge your branch. >4. Probably more FK constraint violations exist that my tests haven't >uncovered. I'd definitely like to be able to run the test suite against Postgres, if even for now it's a manual select (e.g. because Postgres would obviously have to be installed and configured in order to work). _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9