PostgreSQL: add fields to query

Signed-off-by: swpd <swpdtz@gmail.com>