Difference between revisions of "SoC postgres support"

From GeeklogWiki
Jump to: navigation, search
m (Typo)
Line 23: Line 23:
 
Students interested in this project should be ''very'' familiar with Postgres to be able to work around the restrictions outlined above.
 
Students interested in this project should be ''very'' familiar with Postgres to be able to work around the restrictions outlined above.
  
 +
'''Mentor:''' Vinny Furia
  
 
== Further Reading ==
 
== Further Reading ==

Revision as of 19:04, 18 March 2009

(This is an idea page for the Google Summer of Code)

Incentive

Geeklog currently supports MySQL and MS SQL Server for the database. Recently, we have had an increasing amount of requests to add support for PostgreSQL (aka Postgres).


Details

Development of Geeklog started back in 2000 when most of today's database abstraction layers didn't even exist yet. It therefore uses its own (thin) abstraction layer and will have to continue to do so for the foreseeable future.

The idea is simple: Create a database abstraction layer for PostgreSQL for Geeklog. In theory, that would "only" require the implementation of one class in one file: system/databases/postgres.class.php (alongside mysql.class.php and mssql.class.php).

Due to Geeklog's thin database abstraction layer, some non-standard SQL has crept into the codebase here and there. The MS SQL implementation works around this by patching some of those requests at runtime. While our goal is to use standard-compliant SQL as much as possible it may not always be possible to change this for reasons of backward compatibility. Also, not all the code is under our control, e.g. in plugins.

In addition to the actual database class, there are also database-specific files to initialize and upgrade the database and the plugins. They usually include the SQL requests to be executed as well as, in case of upgrade files, some PHP code. Equivalents of these files for Postgres will also have to be implemented (obviously, we would not need upgrade files for older Geeklog versions).


Level of Difficulty

medium to high

Students interested in this project should be very familiar with Postgres to be able to work around the restrictions outlined above.

Mentor: Vinny Furia

Further Reading