Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Seref Arikan
Thanks Oleg, I'll check the slides. On Wed, Sep 24, 2014 at 8:07 PM, Oleg Bartunov wrote: > Check slides 17-20 of > http://www.sai.msu.su/~megera/postgres/talks/hstore-dublin-2013.pdf to > understand, what 'binary format' means. The slides describes binary storage > for nested hstore, not jsonb

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread John R Pierce
On 9/24/2014 7:22 AM, Seref Arikan wrote: This is interesting. Most binary encoding methods I use produce smaller files than the text files for the same content. '1' vs INTEGER 1 ... 1 byte vs 4 bytes. now add metadata necessary to represent the original json structure. -- john r pierce

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Oleg Bartunov
Check slides 17-20 of http://www.sai.msu.su/~megera/postgres/talks/hstore-dublin-2013.pdf to understand, what 'binary format' means. The slides describes binary storage for nested hstore, not jsonb, but you'll get the idea. On Wed, Sep 24, 2014 at 6:22 PM, Seref Arikan wrote: > This is interesti

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Ilya I. Ashchepkov
With the same data: # create cast (jsonb as bytea) without function; # select sum(length(data::text))::float/sum(octet_length((data::jsonb)::bytea)) from data.packets; ?column? --- 0.630663654967513 and 0.554666142734544 without spaces On Wed, Sep 24, 2014 at 9:22 PM, Seref

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Ilya I. Ashchepkov
IMHO, prettification is useful only for debugging. It would be nice to have a session variable for the debug output with spaces, new lines and indentation. On Wed, Sep 24, 2014 at 8:44 PM, Merlin Moncure wrote: > On Wed, Sep 24, 2014 at 2:44 AM, Ilya I. Ashchepkov > wrote: > > I'm sorry about s

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Adrian Klaver
On 09/24/2014 07:22 AM, Seref Arikan wrote: This is interesting. Most binary encoding methods I use produce smaller files than the text files for the same content. Having read your mail, I've realized that I have no reason to accept the same from the jsonb. I did a quick google search to see if i

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Seref Arikan
This is interesting. Most binary encoding methods I use produce smaller files than the text files for the same content. Having read your mail, I've realized that I have no reason to accept the same from the jsonb. I did a quick google search to see if it is wrong to expect binary encoding to decrea

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Adrian Klaver
On 09/24/2014 12:44 AM, Ilya I. Ashchepkov wrote: I'm sorry about sending email several times. I haven't understand, was it sent by gmail or not. On Wed, Sep 24, 2014 at 2:30 PM, John R Pierce mailto:pie...@hogranch.com>> wrote: On 9/24/2014 12:23 AM, Ilya I. Ashchepkov wrote: Is

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Merlin Moncure
On Wed, Sep 24, 2014 at 2:44 AM, Ilya I. Ashchepkov wrote: > I'm sorry about sending email several times. I haven't understand, was it > sent by gmail or not. > > > On Wed, Sep 24, 2014 at 2:30 PM, John R Pierce wrote: >> >> On 9/24/2014 12:23 AM, Ilya I. Ashchepkov wrote: >>> >>> >>> Is spaces i

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Ilya I. Ashchepkov
I'm sorry about sending email several times. I haven't understand, was it sent by gmail or not. On Wed, Sep 24, 2014 at 2:30 PM, John R Pierce wrote: > On 9/24/2014 12:23 AM, Ilya I. Ashchepkov wrote: > >> >> Is spaces is necessary in text presentation of JSONB? >> In my data resulting text con

Re: [GENERAL] JSONB spaces in text presentation

2014-09-24 Thread John R Pierce
On 9/24/2014 12:23 AM, Ilya I. Ashchepkov wrote: Is spaces is necessary in text presentation of JSONB? In my data resulting text contains ~12% of spaces. can you show us an example of this? -- john r pierce 37N 122W somewhere on the middle of the left coa

[GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Ilya I. Ashchepkov
Hi. Is spaces is nessesary in text presentation of JSONB? In my data resulting text contains ~12% of spaces. I'm developing web application, and want to get json-string from pg and send it to browser without repacking. -- С уважением, Ащепков Илья koc...@gmail.com

[GENERAL] JSONB spaces in text presentation

2014-09-24 Thread Ilya I. Ashchepkov
Hi. Is spaces is necessary in text presentation of JSONB? In my data resulting text contains ~12% of spaces. I'm developing web application, and want to get json-string from pg and send it to browser without repacking. -- С уважением, Ащепков Илья koc...@gmail.com

[GENERAL] JSONB spaces in text presentation

2014-09-23 Thread Ilya I. Ashchepkov
Hi. Is spaces is nessesary in text presentation of JSONB? In my data resulting text contains ~12% of spaces. I'm developing web application, and want to get json-string from pg and send it to browser without repacking. -- С уважением, Ащепков Илья koc...@gmail.com