Get Xampp, its a webserver you can download and install on your home computer, complete with php and sql support. It uses mysql tho, i guess its possible to change the apache (webserver) configuration and have it use postgresql instead of mysql.
xampp
EDIT: you might want to use another language than php that doesnt require a webserver running on your computer, at least if you dont need to output webpages. I recommend looking at c#, its really easy and you can get it for free from microsoft
http://www.microsoft.com/express/vcsharp/