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

From Robert Haas
Subject Re: Invalid YAML output from EXPLAIN
Date
Msg-id AANLkTim5g_iySaj4x5Tm0Tqbu7uMjNJZZm90jiM0ZXPJ@mail.gmail.com
Whole thread Raw
In response to Re: Invalid YAML output from EXPLAIN  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: Invalid YAML output from EXPLAIN  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, Jun 9, 2010 at 9:35 AM, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
>>> Does anyone care that Alias will sometimes be a string, and sometimes a number?
>> I guess we could do this by (a) conditionalizing the YAML case in
>> ExplainProperty() in the same way that the JSON case is currently
>> conditionalized, and (b) changing the first if statement in
>> escape_yaml() to set needs_quoting = true unless the first character
>> is alphabetic or an underscore.
> Yes, I think that would do it.

After further review, it appears to me that this change is pretty much
required, because otherwise a string like 0xa won't be quoted.  I
might think it's OK for "123" to turn into 123, but I'm not going to
be so happy about "0xa" turning into 10.  Please test the attached
patch.

>> By the way, can I ask why you're not just using the JSON format for
>> this?  I mean, I'm glad you are, because it exposed a bug that we got
>> fixed before release, but it seems a little masochistic...!
>
> Actually I doubt that I will use this feature at all! I only use
> EXPLAIN from psql, and usually I'm the only one who needs to read it,
> so the TEXT format will remain my preferred option.
>
> I was just doing some random beta testing, working through the list of
> cool new features.

Quick, somebody give this man a cigar!

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

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5495: RI/FK on self and inherited table
Next
From: Robert Haas
Date:
Subject: Re: BUG #5475: Problem during Instalation