json -> sql -> pg coffee style