Re: WIP Patch for GROUPING SETS phase 1

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Atri Sharma <atri(dot)jiit(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP Patch for GROUPING SETS phase 1
Date: 2014-08-25 05:35:02
Message-ID: 87d2bpkuhs.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Robert" == Robert Haas <robertmhaas(at)gmail(dot)com> writes:

Robert> I can accept ugly code, but I feel strongly that we shouldn't
Robert> accept ugly semantics. Forcing cube to get out of the way
Robert> may not be pretty, but I think it will be much worse if we
Robert> violate the rule that quoting a keyword strips it of its
Robert> special meaning; or the rule that there are four kinds of
Robert> keywords and, if a keyword of a particular class is accepted
Robert> as an identifier in a given context, all other keywords in
Robert> that class will also be accepted as identifiers in that
Robert> context. Violating those rules could have not-fun-at-all
Robert> consequences like needing to pass additional context
Robert> information to ruleutils.c's quote_identifier() function, or
Robert> not being able to dump and restore a query from an older
Robert> version even with --quote-all-identifiers. Renaming the cube
Robert> type will suck for people who are using it; but it will only
Robert> have to be done once; weird stuff like the above will be with
Robert> 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sawada Masahiko 2014-08-25 06:36:25 Concurrently option for reindexdb
Previous Message Andrew Gierth 2014-08-25 05:21:13 Re: Final Patch for GROUPING SETS