Re: WIP Patch for GROUPING SETS phase 1 - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: WIP Patch for GROUPING SETS phase 1
Date
Msg-id 87d2bpkuhs.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: WIP Patch for GROUPING SETS phase 1  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: WIP Patch for GROUPING SETS phase 1
List pgsql-hackers
>>>>> "Robert" == Robert Haas <robertmhaas@gmail.com> writes:
Robert> I can accept ugly code, but I feel strongly that we shouldn'tRobert> accept ugly semantics.  Forcing cube to
getout of the wayRobert> may not be pretty, but I think it will be much worse if weRobert> violate the rule that
quotinga keyword strips it of itsRobert> special meaning; or the rule that there are four kinds ofRobert> keywords and,
ifa keyword of a particular class is acceptedRobert> as an identifier in a given context, all other keywords inRobert>
thatclass will also be accepted as identifiers in thatRobert> context.  Violating those rules could have
not-fun-at-allRobert>consequences like needing to pass additional contextRobert> information to ruleutils.c's
quote_identifier()function, orRobert> not being able to dump and restore a query from an olderRobert> version even with
--quote-all-identifiers. Renaming the cubeRobert> type will suck for people who are using it; but it will onlyRobert>
haveto be done once; weird stuff like the above will be withRobert> us forever.
 

If you look at the latest patch post, there's a small patch in it that
does nothing but unreserve the keywords and fix ruleutils to make
deparse/parse work. The required fix to ruleutils is an example of
violating your "four kinds of keywords" principle, but quoting
keywords still works.

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Final Patch for GROUPING SETS
Next
From: Sawada Masahiko
Date:
Subject: Concurrently option for reindexdb