Re: Invalid YAML output from EXPLAIN - Mailing list pgsql-bugs

From Robert Haas
Subject Re: Invalid YAML output from EXPLAIN
Date
Msg-id AANLkTikpXAch22A_o6Hn8LH8lwl1wrDcs06qEFtBwjp4@mail.gmail.com
Whole thread Raw
In response to Re: Invalid YAML output from EXPLAIN  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Invalid YAML output from EXPLAIN  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
On Wed, Jun 9, 2010 at 4:48 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Jun 9, 2010 at 4:47 PM, Dean Rasheed <dean.a.rasheed@gmail.com> w=
rote:
>> On 9 June 2010 20:56, Robert Haas <robertmhaas@gmail.com> wrote:
>>> On Wed, Jun 9, 2010 at 3:50 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> Dean Rasheed <dean.a.rasheed@gmail.com> writes:
>>>>> Hmm. Well it's quite subjective, but IMO it's already more readable
>>>>> than JSON regardless of whether or not values are quoted, simply
>>>>> because it doesn't have [ ] and { } for lists and maps, which for JSON
>>>>> adds significantly to the number of lines in longer plans.
>>>>
>>>> Yeah. =A0Also, I think it would be fair to not quote values that are k=
nown
>>>> constants (for example, Node Type: Seq Scan) and are chosen to not need
>>>> quoting. =A0It's just the things that are variables that worry me.
>>>
>>> Passing down information about which things are known constants seems
>>> more complicated to me than just getting the quoting rules right in
>>> the first place. =A0If you look at the patch I proposed, you'll see that
>>> it's really quite simple and only a slight tightening of what I
>>> committed already.
>>>
>>
>> Reading the YAML spec, I've just spotted yet another case that'll
>> break what you're proposing: if you don't quote "true" and "false",
>> the parser will think they're booleans rather than strings.
>>
>> This is really why I'm opposed to this approach. There are just so
>> many gotchas that it's impossible to be 100% sure that you've
>> accounted for them all.
>
> OK, I give up.

I have committed your patch, with some changes to the comments.

Thanks for bearing with me.

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

pgsql-bugs by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Invalid YAML output from EXPLAIN
Next
From: Russell Smith
Date:
Subject: Re: pg_restore ignores -C when using a restore list -L