From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Marti Raudsepp <marti(at)juffo(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tv(at)fuzzy(dot)cz>, Josh Berkus <josh(at)agliodbs(dot)com>, Atri Sharma <atri(dot)jiit(at)gmail(dot)com> |
Subject: | Re: Final Patch for GROUPING SETS |
Date: | 2014-09-19 15:35:52 |
Message-ID: | 871tr7pshe.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>>>> "Marti" == Marti Raudsepp <marti(at)juffo(dot)org> writes:
>> (yaml format)
>> Grouping Sets:
>> - - "two"
>> - "four"
>> - - "two"
>> -
Marti> Now this is weird.
You're telling me. Also, feeding it to an online yaml-to-json
converter gives the result as [["two","four"],["two"],null] which is
not quite the same as the json version. An alternative would be:
Grouping Sets:
- - "two"
- "four"
- - "two"
- []
or
Grouping Sets:
-
- "two"
- "four"
-
- "two"
- []
though I haven't managed to get that second one to work yet.
Marti> But is anyone actually using YAML output format, or was it
Marti> implemented simply "because we can"?
Until someone decides to dike it out, I think we are obligated to make
it produce something resembling correct output.
Marti> The reason I bring this up is that queries are frequently
Marti> dynamically generated by programs.
Good point.
>> would you want the original syntax preserved in views
Marti> Doesn't matter IMO.
I think it's fairly consistent for the parser to do this, since we do
a number of other normalization steps there (removing excess nesting
and so on). This turns out to be quite trivial.
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2014-09-19 15:41:31 | pgsql: Row-Level Security Policies (RLS) |
Previous Message | Robert Haas | 2014-09-19 15:23:59 | identify_locking_dependencies is broken for schema-only dumps |