You do NOT need to call pg_free_result() on every result resource you create.When result resources go out of scope, they are garbage collected just like everything else.Unless you're hoarding your results somewhere, you can basically ignore this function.Here's a little test you can run to confirm this: http://pastebin.com/ghw1PHuE