json query on postgres setup via AJAX (jQuery)