Fix pg_settings query.

unit is available in >= 8.2 and boot and reset since 8.4.
Merge pull request #29 from eulerto/queryfixes

Fix pg_settings query.