in reply to PostgreSQL web application examples?

SQL-Ledger is an open source web application with a large user base, lots of interesting features (multi user accounting) that uses postgres and perl. It is discussed here in (OT) Perl Open Source accounting packages?.

Unfortunately, as Ovid notes, the code has a lot of aspects that deviate from "best practices" including

* Poorly written * Doesn't use strict * Extensive use of global variables * Has security concerns * Is non-portable * Hand-rolled template system * Difficult to test * Will be difficult to extend * And guess how it handles CGI data ...
So it probably isn't the best example for a web framework. However, it may be good for seeing how they set up the postgres stuff, including how they use postgres's rollback features which ensures the integrity of the general ledger by protecting against cases when updates conflict with each other. This would be impossible to do in mysql for the foreseeable future, as far as I know and is one of the main reason certain projects choose to go with the less mainstream postgres.

Sql-ledger is licensed under the GPL but it's documentation, including developer guide, are not open source and are only available for a price, which is fairly steep. I suspect the documentation packages are one of the main sources of income for the developer, along with consulting for customizations for his heavier users.