Josh Berkus wrote:
On 11/30/09 8:17 PM, Andrew Dunstan wrote:
Do we have consensus yet that we want YAML?  It seemed, well,
yet another format without all that much advantage over what's
there.

Well, what's the code count?  What dependencies, if any, does it add?



The patch itself is quite small. There are no extra external dependencies.

YAML and JSON are pretty much interchangeable for our purposes. According to Wikipedia, "Both functionally and syntactically, JSON is effectively a subset of YAML." See <http://en.wikipedia.org/wiki/JSON#YAML> So the YAML parsers should be able to handle the JSON output. The only thing we'd be buying with this patch is making a bit happier some people who prefer reading the YAML syntax. For machine readability we'd be gaining precisely nothing.

I guess the question is this: when are we going to say "No more output formats. We have enough."?

One consideration is this: the more formats we support the dumber the output will be. Already the XML output is arguably dumber than it should be, because XML elements are two-dimensional (they can have property lists (attributes) and child elements) but JSON/YAML nodes are one-dimensional, so we have made some things that one might normally expect to be attributes in XML into child elements. While adding YAML won't impose any additional burden of that kind, because its semantics are so close to those of JSON, other output formats well might.

cheers

andrew



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to