Monday, January 16. 2012Under the wireTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
This is absolutely great. Many thanks! I always thought the XML handling in SQL Server was very good in comparison to others (PostgreSQL and virtually non-existent in MySQL), so seeing another web format being supported is great.<br /> Fantastic. Particularly once coupled with PL/V8 this is going to be really exciting for a lot of folks in the web community. Super, Andrew! (We have clients clamoring for this feature). Much-needed, long-awaited and now, right around the corner. Well, in the first place we can't do that in the core types, because hstore is an extension type. Beyond that, there are difficulties in that a) hstore is a flat structure, but json is an arbitrarily deep tree structure, and b) we're storing JSON as text, so we'd need to parse it. Probably we'll be able to do something of the kind, at least in the JSON->hstore direction, using PLV8. It shouldn't be too hard to create an extension which did hstore->JSON. I'll look at that. this conversion can be done in hstore module - JSONHStore, but I don't see a advantage of this step - HStore is too flat - but it can be good for interoperability. I realize the necessary limitations of such a feature, at least in the JSON -> hstore direction, but I think it would be great for interoperability. hstore is increasingly being used in environments where JSON is common. JSON parsers are a lot more common in the real world than hstore parsers.<br /> Well, don't do that <img src="/andrew/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> Turning an hstore into XML, for example, is pretty easy. See http://people.planetpostgresql.org/andrew/index.php?/archives/63-hstore-and-XML-fun.html Thank you Andrew, this is exactly the feature I need. Do you have a way to donate money to you, or to the project? If you want to donate to the project, please go to http://www.postgresql.org/about/donate_pg_org. <br /> Hi Andrew,<br /> You write it like this:<br /> Thanks Andrew, this is awesome stuff. I just tried it out on the below query to nest data and this is going to be a game changer once it matures a bit. Specifically (and I didn't see how to get it to work otherwise), using fx for key names makes it tuff to use today. How come it just doesn't use the column names, I'm pretty sure any valid column identifier in postgres would also be a valid javascript identifier.<br /> Are you using the 9.1 backport? Most of this loss of column labels has been fixed in the development branch, which will become Postgres 9.2. Yes, the backport from your bitbucket repo. I looked at the source to see if I could fix it quickly, but it looks like line 900 of json.c is using attname, and since I haven't touched C in over a decade, I'll just assume it's beyond my paygrade!<br /> The changes have been backported if you feel brave and want to try them out: <br /> |
My Links etcBlog AdministrationCalendar
QuicksearchArchivesCategories |
|||||||||||||||||||||||||||||||||||||||||||||||||