Hi guys,
As mentioned in the last email that the current interface is based on bytea. To make users easily insert any thrift data structure and show them, we may want
to have user friendly (user readable) format for this plugin. I can think about 2 ways to do this. One is to provide to_thrift(json object) and to_json(thrift object) interfaces in the plugin.
And the format in database table is still bytea. So, when you want to insert data into the table, users provide json/jsonb object, then call to_thrift() to covert to
thrift bytes. When one want to read table content, using to_json() to covert thrift bytes to json.
The second is to provide thrift type just like json or jsonb. When you create a table, postgres knows ::thrift keywords.
I think method one should be easier to implement because it only limits to this plugin. Method two needs modify postgres kernel to register a new type, which may time consuming,
but more natural. Any ideas on this?
Thanks, Charles