Re: Add ZSON extension to /contrib/

2021-10-08 Thread Aleksander Alekseev
Hi hackers, Many thanks for all the great feedback! Please see the follow-up thread `RFC: compression dictionaries for JSONB`: https://www.postgresql.org/message-id/CAJ7c6TPx7N-bVw0dZ1ASCDQKZJHhBYkT6w4HV1LzfS%2BUUTUfmA%40mail.gmail.com -- Best regards, Aleksander Alekseev Open-Source

Re: Add ZSON extension to /contrib/

2021-07-10 Thread Tomas Vondra
On 7/3/21 12:34 PM, Peter Eisentraut wrote: On 04.06.21 17:09, Aleksander Alekseev wrote: I decided to add the patch to the nearest commitfest. With respect to the commit fest submission, I don't think there is consensus right now to add this.  I think people would prefer that this

Re: Add ZSON extension to /contrib/

2021-07-03 Thread Peter Eisentraut
On 04.06.21 17:09, Aleksander Alekseev wrote: I decided to add the patch to the nearest commitfest. With respect to the commit fest submission, I don't think there is consensus right now to add this. I think people would prefer that this dictionary facility be somehow made available in the

Re: Add ZSON extension to /contrib/

2021-06-04 Thread Aleksander Alekseev
Hi hackers, Many thanks for the feedback and all the great suggestions! I decided to add the patch to the nearest commitfest. You will find it in the attachment. Differences from the GitHub version: - Code formatting changed; - More comments added to the code; - SGML documentation added; -

Re: Add ZSON extension to /contrib/

2021-05-30 Thread Joel Jacobson
On Tue, May 25, 2021, at 22:10, Tom Lane wrote: > Magnus Hagander mailto:magnus%40hagander.net>> writes: > > On Tue, May 25, 2021 at 12:55 PM Aleksander Alekseev > > mailto:aleksander%40timescale.com>> wrote: > >> Back in 2016 while being at PostgresPro I developed the ZSON extension > >> [1].

Re: Add ZSON extension to /contrib/

2021-05-28 Thread Tomas Vondra
On 5/28/21 4:22 PM, Andrew Dunstan wrote: > > On 5/28/21 6:35 AM, Tomas Vondra wrote: >> >>> >>> IMO the main benefit of having different dictionaries is that you >>> could have a small dictionary for small and very structured JSONB >>> fields (e.g. some time-series data), and a large one for

Re: Add ZSON extension to /contrib/

2021-05-28 Thread Andrew Dunstan
On 5/28/21 6:35 AM, Tomas Vondra wrote: > >> >> IMO the main benefit of having different dictionaries is that you >> could have a small dictionary for small and very structured JSONB >> fields (e.g. some time-series data), and a large one for large / >> unstructured JSONB fields, without having

Re: Add ZSON extension to /contrib/

2021-05-28 Thread Tomas Vondra
On 5/27/21 4:15 AM, Andrew Dunstan wrote: > > On 5/26/21 5:29 PM, Bruce Momjian wrote: >> On Tue, May 25, 2021 at 01:55:13PM +0300, Aleksander Alekseev wrote: >>> Hi hackers, >>> >>> Back in 2016 while being at PostgresPro I developed the ZSON extension [1]. >>> The >>> extension introduces

Re: Add ZSON extension to /contrib/

2021-05-28 Thread Tomas Vondra
On 5/26/21 2:49 AM, Stephen Frost wrote: > Greetings, > > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Matthias van de Meent writes: >>> I like the idea of the ZSON type, but I'm somewhat disappointed by its >>> current limitations: >> >> I've not read the code, so maybe this thought is

Re: Add ZSON extension to /contrib/

2021-05-28 Thread Tomas Vondra
On 5/26/21 6:43 PM, Matthias van de Meent wrote: > On Wed, 26 May 2021 at 12:49, Aleksander Alekseev > wrote: >> >> Hi hackers, >> >> Many thanks for your feedback, I very much appreciate it! >> >>> If the extension is mature enough, why make it an extension in >>> contrib, and not instead

Re: Add ZSON extension to /contrib/

2021-05-26 Thread Andrew Dunstan
On 5/26/21 5:29 PM, Bruce Momjian wrote: > On Tue, May 25, 2021 at 01:55:13PM +0300, Aleksander Alekseev wrote: >> Hi hackers, >> >> Back in 2016 while being at PostgresPro I developed the ZSON extension [1]. >> The >> extension introduces the new ZSON type, which is 100% compatible with JSONB

Re: Add ZSON extension to /contrib/

2021-05-26 Thread Bruce Momjian
On Tue, May 25, 2021 at 01:55:13PM +0300, Aleksander Alekseev wrote: > Hi hackers, > > Back in 2016 while being at PostgresPro I developed the ZSON extension [1]. > The > extension introduces the new ZSON type, which is 100% compatible with JSONB > but > uses a shared dictionary of strings most

Re: Add ZSON extension to /contrib/

2021-05-26 Thread Matthias van de Meent
On Wed, 26 May 2021 at 12:49, Aleksander Alekseev wrote: > > Hi hackers, > > Many thanks for your feedback, I very much appreciate it! > > > If the extension is mature enough, why make it an extension in > > contrib, and not instead either enhance the existing jsonb type with > > it or make it a

Re: Add ZSON extension to /contrib/

2021-05-26 Thread Konstantin Knizhnik
On 25.05.2021 13:55, Aleksander Alekseev wrote: Hi hackers, Back in 2016 while being at PostgresPro I developed the ZSON extension [1]. The extension introduces the new ZSON type, which is 100% compatible with JSONB but uses a shared dictionary of strings most frequently used in given

Re: Add ZSON extension to /contrib/

2021-05-26 Thread Aleksander Alekseev
Hi hackers, Many thanks for your feedback, I very much appreciate it! > If the extension is mature enough, why make it an extension in > contrib, and not instead either enhance the existing jsonb type with > it or make it a built-in type? > IMO we have too d*mn many JSON types already. If we

Re: Add ZSON extension to /contrib/

2021-05-25 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Matthias van de Meent writes: > > I like the idea of the ZSON type, but I'm somewhat disappointed by its > > current limitations: > > I've not read the code, so maybe this thought is completely off-point, > but I wonder if anything could be

Re: Add ZSON extension to /contrib/

2021-05-25 Thread Andrew Dunstan
On 5/25/21 4:31 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 5/25/21 4:10 PM, Tom Lane wrote: >>> Also, even if ZSON was "100% compatible with JSONB" back in 2016, >>> a whole lot of features have been added since then. Having to >>> duplicate all that code again for a different data

Re: Add ZSON extension to /contrib/

2021-05-25 Thread Tom Lane
Matthias van de Meent writes: > I like the idea of the ZSON type, but I'm somewhat disappointed by its > current limitations: I've not read the code, so maybe this thought is completely off-point, but I wonder if anything could be learned from PostGIS. AIUI they have developed the

Re: Add ZSON extension to /contrib/

2021-05-25 Thread Tom Lane
Andrew Dunstan writes: > On 5/25/21 4:10 PM, Tom Lane wrote: >> Also, even if ZSON was "100% compatible with JSONB" back in 2016, >> a whole lot of features have been added since then. Having to >> duplicate all that code again for a different data type is not >> something I want to see us

Re: Add ZSON extension to /contrib/

2021-05-25 Thread Andrew Dunstan
On 5/25/21 4:10 PM, Tom Lane wrote: > Magnus Hagander writes: >> On Tue, May 25, 2021 at 12:55 PM Aleksander Alekseev >> wrote: >>> Back in 2016 while being at PostgresPro I developed the ZSON extension [1]. >>> The extension introduces the new ZSON type, which is 100% compatible with >>>

Re: Add ZSON extension to /contrib/

2021-05-25 Thread Matthias van de Meent
On Tue, 25 May 2021 at 13:32, Magnus Hagander wrote: > > On Tue, May 25, 2021 at 12:55 PM Aleksander Alekseev > wrote: > > > > Hi hackers, > > > > Back in 2016 while being at PostgresPro I developed the ZSON extension [1]. > > The extension introduces the new ZSON type, which is 100% compatible

Re: Add ZSON extension to /contrib/

2021-05-25 Thread Tom Lane
Magnus Hagander writes: > On Tue, May 25, 2021 at 12:55 PM Aleksander Alekseev > wrote: >> Back in 2016 while being at PostgresPro I developed the ZSON extension [1]. >> The extension introduces the new ZSON type, which is 100% compatible with >> JSONB but uses a shared dictionary of strings

Re: Add ZSON extension to /contrib/

2021-05-25 Thread Andrew Dunstan
On 5/25/21 6:55 AM, Aleksander Alekseev wrote: > Hi hackers, > > Back in 2016 while being at PostgresPro I developed the ZSON extension > [1]. The extension introduces the new ZSON type, which is 100% > compatible with JSONB but uses a shared dictionary of strings most > frequently used in given

Re: Add ZSON extension to /contrib/

2021-05-25 Thread Magnus Hagander
On Tue, May 25, 2021 at 12:55 PM Aleksander Alekseev wrote: > > Hi hackers, > > Back in 2016 while being at PostgresPro I developed the ZSON extension [1]. > The extension introduces the new ZSON type, which is 100% compatible with > JSONB but uses a shared dictionary of strings most frequently

Add ZSON extension to /contrib/

2021-05-25 Thread Aleksander Alekseev
Hi hackers, Back in 2016 while being at PostgresPro I developed the ZSON extension [1]. The extension introduces the new ZSON type, which is 100% compatible with JSONB but uses a shared dictionary of strings most frequently used in given JSONB documents for compression. These strings are replaced