Re: Benchmark of using JSON to transport query results in node.js - Mailing list pgsql-general

From Michel Pelletier
Subject Re: Benchmark of using JSON to transport query results in node.js
Date
Msg-id CACxu=v+aFvitWyHPeP-0AFjZS=9Qzo5fahNC_T=2LF8StwZvEQ@mail.gmail.com
Whole thread Raw
In response to Re: Benchmark of using JSON to transport query results in node.js  (Mitar <mmitar@gmail.com>)
List pgsql-general
On Fri, Jan 11, 2019 at 10:31 AM Mitar <mmitar@gmail.com> wrote:
Hi!

> Another option is to query directly from node.js and get JSON or native query from the database (extensive use of functions / stored procedures).

For web applications, I was even thinking about this crazy approach:
get PostgreSQL to encode all results in JSON, and then in node.js do
not parse JSON, but send it as string directly to the browser.

Not crazy at all, that's basically how PostgREST works:


-Michel 
 

pgsql-general by date:

Previous
From: Mitar
Date:
Subject: Re: Benchmark of using JSON to transport query results in node.js
Next
From: Rich Shepard
Date:
Subject: insert into: NULL in date column