+1 for plv8 .. it's probably the biggest thing that separates pgsql from other sql options (combined with json datatypes). I know there are other data options for nosql/json data, but being able to use a single data store that can touch both your important transactional data, and your document records is pretty sweet, and being able to use a query language that doesn't suck for the task is nicer still.... mostly SQL, some JS, nice all around.