Re: Bypassing NULL elements in row_to_json function - Mailing list pgsql-general

From Michael Nolan
Subject Re: Bypassing NULL elements in row_to_json function
Date
Msg-id CAOzAquJPR+F5vP9PdLr1pnA5wa8QbtaJ+2LwREFsPBeqJTMgcw@mail.gmail.com
Whole thread Raw
In response to Re: Bypassing NULL elements in row_to_json function  (Michael Nolan <htfoot@gmail.com>)
Responses Re: Bypassing NULL elements in row_to_json function
List pgsql-general
I was able to try it on a test server, the combination of row_to_json() and json_strip_nulls() worked exactly as I had hoped.  Stripping nulls reduced the JSON file by over 50%. (The data I needed to export has around 900,000 rows, so it gets quite large.)

I've got a test file I can make available to app developers.

My next task is to find out if validating and importing a JSON file into a table is as easy as exporting a table in JSON turned out to be. Thanks for the help.
--
Mike Nolan



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Really unique session ID - PID + connection timestamp?
Next
From: Tom Lane
Date:
Subject: Re: Really unique session ID - PID + connection timestamp?