(shameless plug alert and crosspost alert: I figured this belonged in Flash/AS3 so I put it there, but since I spent most of my time in this forum back when I was more active, I wanted to drop a note here as well, especially since it could be especially handy in AIR applications--it even comes with an AIR demo app)
I recently tagged the first version of pegasus, a native ActionScript implementation of the PostgreSQL database wire protocol. Using this library, you can connect from a Flash application directly to PostgreSQL (subject to the usual networking restrictions).
This is the first release version so it's a little rough around the edges, but it supports a couple of the simpler authentication modes, basic interaction through both simple and parameterized queries, the PostgreSQL LISTEN/NOTIFY protocol, and basic data types: text, integers (32-bit and smaller), floats, and booleans. Like PostgreSQL itself, it is BSD-licensed so you can use it more or less anywhere.
Please let me know what you think and if you use it in your project.
I'll probably end up checking it out. For my next pet-project I might end up using Postgres because of the text-searching and the ability to have foreign keys (I'm looking at you InnoDB).