Re: YAML Was: CommitFest status/management - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: YAML Was: CommitFest status/management
Date
Msg-id 4B167E41.70406@dunslane.net
Whole thread Raw
In response to Re: YAML Was: CommitFest status/management  (Josh Berkus <josh@agliodbs.com>)
Responses Re: YAML Was: CommitFest status/management
Re: YAML Was: CommitFest status/management
List pgsql-hackers

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




pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Page-level version upgrade
Next
From: Alvaro Herrera
Date:
Subject: Re: compile error with -DOPTIMIZER_DEBUG