Re: GSoC 2018: thrift encoding format

2018-05-06 Thread Charles Cui
Thanks guys for your ideas! I feel like it is easier to follow pg_protobuf 's method to design and implement pg_thrift for a postgres beginner like me. I can refer pg_protobuf's way of using functions, writing tests, etc. I will reconsider what's the returned format for list, sets, and struct,

Re: GSoC 2018: thrift encoding format

2018-05-04 Thread Stephen Frost
Greetings, * Aleksander Alekseev (a.aleks...@postgrespro.ru) wrote: > > I understand that you're open to having it as a new data type or as a > > bytea, but I don't agree. This should be a new data type, just as json > > is a distinct data type and so is jsonb. > > Could you please explain in a

Re: GSoC 2018: thrift encoding format

2018-05-04 Thread Aleksander Alekseev
Hello Stephen, > Perhaps the design decisions aren't all made beforehand, but they also > shouldn't be made in a vacuum- there should be discussions on -hackers > about what the right decision is for a given aspect and that's what > should be worked towards. +1, agree. > > Personally I would

Re: GSoC 2018: thrift encoding format

2018-05-04 Thread Stephen Frost
Greetings, * Aleksander Alekseev (a.aleks...@postgrespro.ru) wrote: > >> Personally I think raw data bytes are OK if functions for getting all > >> keys and values from this data are provided > > > > What is the purpose of using Thrift "encoding" if it turns out to be a > > simple wrapper for

Re: GSoC 2018: thrift encoding format

2018-05-04 Thread Aleksander Alekseev
Hello Vladimir, > I'm just trying to figure out what are the use cases for using that Thrift > extension. You can find an answer in the project description: https://wiki.postgresql.org/wiki/GSoC_2018#Thrift_datatype_support_.282018.29 -- Best regards, Aleksander Alekseev signature.asc

Re: GSoC 2018: thrift encoding format

2018-05-04 Thread Vladimir Sitnikov
>I mean Charles is free to choose the interface for the extension he believes is right I'm just trying to figure out what are the use cases for using that Thrift extension. For instance, it would be interesting if Thrift was an alternative way to transfer data between client and the database. I

Re: GSoC 2018: thrift encoding format

2018-05-04 Thread Aleksander Alekseev
Hello Vladimir, >> Personally I think raw data bytes are OK if functions for getting all >> keys and values from this data are provided > > What is the purpose of using Thrift "encoding" if it turns out to be a > simple wrapper for existing binary data? > > Do you mean the goal is to have

Re: GSoC 2018: thrift encoding format

2018-05-03 Thread Vladimir Sitnikov
>Personally I think raw data bytes are OK if functions for getting all keys and values from this data are provided What is the purpose of using Thrift "encoding" if it turns out to be a simple wrapper for existing binary data? Do you mean the goal is to have "get/set" functions to fetch data out

Re: GSoC 2018: thrift encoding format

2018-05-03 Thread Aleksander Alekseev
Hello Charles, > Thanks for your confirm Aleksander! > Also I am thinking of how to deal with complex > data structure like map, list, or set. I guess one possible > solution is to get raw data bytes for these data structure? > Otherwise it could be hard to wrap into a Datum. Personally I think

Re: GSoC 2018: thrift encoding format

2018-05-02 Thread Charles Cui
Thanks for your confirm Aleksander! Also I am thinking of how to deal with complex data structure like map, list, or set. I guess one possible solution is to get raw data bytes for these data structure? Otherwise it could be hard to wrap into a Datum. 2018-05-02 8:38 GMT-07:00 Aleksander Alekseev

Re: GSoC 2018: thrift encoding format

2018-05-02 Thread Aleksander Alekseev
Hello Charles, > Can I assume the data in thrift is always send inside a struct? Sure! > I think this question also valid for protobuf? Right, pg_protobuf assumes that data is always a message which is an equivalent of Thrift's struct. -- Best regards, Aleksander Alekseev signature.asc

GSoC 2018: thrift encoding format

2018-04-29 Thread Charles Cui
Hi Aleksander, Start to study the format of thrift encoding format (binary protocol) and found this document( https://erikvanoosten.github.io/thrift-missing-specification/#_struct_encoding). Having one question. Can I assume the data in thrift is always send inside a struct? Otherwise, it