Re: new json funcs - Mailing list pgsql-hackers
From | Laurence Rowe |
---|---|
Subject | Re: new json funcs |
Date | |
Msg-id | CAOycyLRBLfj-TAqVpmYuAk10aKw1E7MqsSPcQpsKQnft=Uj5AA@mail.gmail.com Whole thread Raw |
In response to | Re: new json funcs (Andrew Dunstan <andrew@dunslane.net>) |
Responses |
Re: new json funcs
|
List | pgsql-hackers |
<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">For consistency with the existing json functions(json_each, json_each_text, etc.) it might be better to add separate json_to_record_text and json_to_recordset_textfunctions in place of the nested_as_text parameter to json_to_record and json_to_recordset.</span><br/></div><div class="gmail_extra"><br /><br /><div class="gmail_quote">On 24 January 201410:26, Andrew Dunstan <span dir="ltr"><<a href="mailto:andrew@dunslane.net" target="_blank">andrew@dunslane.net</a>></span>wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px#ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br /> On 01/22/2014 12:49 PM, AndrewDunstan wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br/> On 01/21/2014 06:21 PM, Marko Tiikkaja wrote:<br /><blockquote class="gmail_quote" style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi Andrew,<br /><br /> On 1/18/14, 10:05 PM, I wrote:<br/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> But I'llcontinue with my review now that this has been sorted out.<br /></blockquote><br /> Sorry about the delay.<br /><br />I think the API for the new functions looks good. They are all welcome additions to the JSON family.<br /><br /> The implementationside looks reasonable to me. I'm not sure there's need to duplicate so much code, though. E.g. json_to_recordsetis almost identical to json_populate_recordset, and json_to_record has a bit of the same disease.<br /><br/> Finally, (as I'm sure you know already), docs are still missing. Marking the patch Waiting on Author for the timebeing.<br /><br /><br /><br /></blockquote><br /><br /> New patch attached. Main change is I changed json_populate_record/json_to_<u></u>recordto call a common worker function, and likewise with json_populate_recordset/json_<u></u>to_recordset.<br/><br /> We're still finalizing the docs - should be ready in the nextday or so.<br /></blockquote><br /><br /></div></div> OK, here's the patch, this time with docs, thanks to Merlin Moncureand Josh Berkus for help with that.<br /><br /> I want to do some more wordsmithing around json_to_record{set} andjson_populate_record{set}, but I think this is close to being committable as is.<br /><br /> cheers<span class="HOEnZb"><fontcolor="#888888"><br /><br /> andrew<br /><br /><br /></font></span><br /><br /> --<br /> Sent via pgsql-hackersmailing list (<a href="mailto:pgsql-hackers@postgresql.org">pgsql-hackers@postgresql.org</a>)<br /> To makechanges to your subscription:<br /><a href="http://www.postgresql.org/mailpref/pgsql-hackers" target="_blank">http://www.postgresql.org/mailpref/pgsql-hackers</a><br/><br /></blockquote></div><br /></div>
pgsql-hackers by date: