by Jack Christensen on January 29, 2013 A new feature in PostgreSQL 9.2 is JSON support. It includes a JSON data type and two JSON functions. These allow us to return JSON directly from the database server. This article covers how it is done and includes a benchmark comparing it with traditional Rails JSON generation techniques. How To The simplest way to return JSON is with row_to_json() function