Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1adg5e-0007uz-LK for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Mar 2016 15:31:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1adg5e-00049V-7v for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Mar 2016 15:31:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1adg51-0003CC-5f for pgsql-bugs@postgresql.org; Wed, 09 Mar 2016 15:31:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1adg4s-0001YK-Oh for pgsql-bugs@postgresql.org; Wed, 09 Mar 2016 15:31:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u29FV690009733; Wed, 9 Mar 2016 10:31:06 -0500 From: Tom Lane To: Amit Langote cc: =?UTF-8?B?5byg5paH5Y2H?= , pgsql-bugs@postgresql.org Subject: Re: gram.y comment issue In-reply-to: References: <56DFBCD0.7050909@qunar.com> Comments: In-reply-to Amit Langote message dated "Wed, 09 Mar 2016 21:54:29 +0900" Date: Wed, 09 Mar 2016 10:31:06 -0500 Message-ID: <9732.1457537466@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Amit Langote writes: > On Wed, Mar 9, 2016 at 3:04 PM, 张文升 wrote: >> The gram.y includes the line(line:1965): >> /* ALTER TABLE ALTER [COLUMN] SET ( column_parameter = >> value [, ... ] ) */ >> ALTER opt_column ColId RESET reloptions >> The comment has the word "SET", but I think that's should be "RESET". > This one needs to be fixed. Agreed, done. >> src/include/nodes/parsenodes.h line:141 >> List *distinctClause; /* a list of SortGroupClause's */ >> The comment has the word "SortGroupClause", but that's should be >> "distinctClause". > This one is fine. The name distinctClause here is parser's way of > referring to the SQL construct DISTINCT ON () in a > SELECT query, where each member of the list is a SortGroupClause item. Yes. It might be surprising if you don't know that ORDER BY, GROUP BY, and DISTINCT all have a common parsetree representation ... but the comment is correct as written. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs