On 09-12-2013 13:12, Merlin Moncure wrote:
> This is pretty neat. Couple minor questions:
> *) Aren't you *en*coding data into json, not the other way around (decoding?)
>
Yes. The 'decoding' came from the functionality (logical decoding) and
because the POC plugin is named 'test_decoding'. I also think that
'json_decoding' doesn't say much about the module purpose. I confess
that I don't like the name but can't come up with a good name. Maybe
'wal2json' or 'logrep2json'? Could you suggest something?
> *) Consider generating a long bytea instead of explicitly writing a
> 32kb sql into the patch.
>
I'll consider for next version.
> *) You've built your own json serializer here. Maybe some code can be
> shared with the json type?
>
Same here. I already took a look at the json datatype but decided that I
wouldn't mess up with the backend code before have a feedback in the
general idea.
> *) Consider removing 'plugin ' from the name of the plugin.
> --plugin=json_decoding etc.
>
'plugin' was a tentative to produce an unique name (it sucks but...).
-- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento,
Suporte24x7 e Treinamento